simplify bot settings
This commit is contained in:
parent
f0c8cc54cc
commit
6d733b06dd
20
bot.js
20
bot.js
@ -8,22 +8,22 @@ const { Worker } = require('worker_threads');
|
|||||||
var connconfig = {
|
var connconfig = {
|
||||||
server: config.get('irc.server'),
|
server: config.get('irc.server'),
|
||||||
port: config.get('irc.port'),
|
port: config.get('irc.port'),
|
||||||
SSL: config.get('irc.port'),
|
SSL: config.get('irc.ssl'),
|
||||||
channels: config.get('irc.channels'),
|
channels: config.get('irc.channels'),
|
||||||
botName: config.get('irc.nickname'),
|
botName: config.get('irc.nickname'),
|
||||||
userName: config.get('irc.username'),
|
userName: config.get('irc.username'),
|
||||||
realName: config.get('irc.realname')
|
realName: config.get('irc.realname')
|
||||||
};
|
};
|
||||||
|
|
||||||
var bot = new irc.Client(connconfig.server, connconfig.botName, {
|
var bot = new irc.Client(config.get('irc.server'), config.get('irc.nickname'), {
|
||||||
channels: connconfig.channels,
|
channels: config.get('irc.channels'),
|
||||||
secure: connconfig.SSL,
|
secure: config.get('irc.ssl'),
|
||||||
port: connconfig.port,
|
port: config.get('irc.port'),
|
||||||
autoRejoin: true,
|
autoRejoin: config.get('irc.autorejoin'),
|
||||||
userName: connconfig.userName,
|
userName: config.get('irc.username'),
|
||||||
realName: connconfig.realName,
|
realName: config.get('irc.realname'),
|
||||||
floodProtection: false,
|
floodProtection: config.get('irc.floodprotection'),
|
||||||
floodProtectionDelay: 0
|
floodProtectionDelay: config.get('irc.floodprotectiondelay')
|
||||||
});
|
});
|
||||||
|
|
||||||
const timer = ms => new Promise(res => setTimeout(res, ms))
|
const timer = ms => new Promise(res => setTimeout(res, ms))
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
],
|
],
|
||||||
"nickname": "mercury",
|
"nickname": "mercury",
|
||||||
"username": "mercury",
|
"username": "mercury",
|
||||||
"realname": "git.supernets.org/hogwart7/mercury"
|
"realname": "git.supernets.org/hogwart7/mercury",
|
||||||
|
"autorejoin": "true",
|
||||||
|
"floodprotection": "false",
|
||||||
|
"floodprotectiondelay": "0"
|
||||||
},
|
},
|
||||||
"feed": {
|
"feed": {
|
||||||
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13.4; rv:109.0) Gecko/20100101 Firefox/114.0",
|
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13.4; rv:109.0) Gecko/20100101 Firefox/114.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user