diff --git a/bot.js b/bot.js index 766bdd1..d07fb19 100644 --- a/bot.js +++ b/bot.js @@ -8,22 +8,22 @@ const { Worker } = require('worker_threads'); var connconfig = { server: config.get('irc.server'), port: config.get('irc.port'), - SSL: config.get('irc.port'), + SSL: config.get('irc.ssl'), channels: config.get('irc.channels'), botName: config.get('irc.nickname'), userName: config.get('irc.username'), realName: config.get('irc.realname') }; -var bot = new irc.Client(connconfig.server, connconfig.botName, { - channels: connconfig.channels, - secure: connconfig.SSL, - port: connconfig.port, - autoRejoin: true, - userName: connconfig.userName, - realName: connconfig.realName, - floodProtection: false, - floodProtectionDelay: 0 +var bot = new irc.Client(config.get('irc.server'), config.get('irc.nickname'), { + channels: config.get('irc.channels'), + secure: config.get('irc.ssl'), + port: config.get('irc.port'), + autoRejoin: config.get('irc.autorejoin'), + userName: config.get('irc.username'), + realName: config.get('irc.realname'), + floodProtection: config.get('irc.floodprotection'), + floodProtectionDelay: config.get('irc.floodprotectiondelay') }); const timer = ms => new Promise(res => setTimeout(res, ms)) diff --git a/config/example.default.json b/config/example.default.json index d04c7bf..60142ad 100644 --- a/config/example.default.json +++ b/config/example.default.json @@ -8,7 +8,10 @@ ], "nickname": "mercury", "username": "mercury", - "realname": "git.supernets.org/hogwart7/mercury" + "realname": "git.supernets.org/hogwart7/mercury", + "autorejoin": "true", + "floodprotection": "false", + "floodprotectiondelay": "0" }, "feed": { "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13.4; rv:109.0) Gecko/20100101 Firefox/114.0",