simplify bot settings

This commit is contained in:
hgw 2023-10-02 02:11:24 +00:00
parent f0c8cc54cc
commit 6d733b06dd
2 changed files with 14 additions and 11 deletions

20
bot.js
View File

@ -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))

View File

@ -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",