reshuffle flood protection config toggles
This commit is contained in:
parent
6f77fb96cf
commit
14ddf29ae7
8
bot.js
8
bot.js
@ -16,8 +16,8 @@ var bot = new irc.Client(config.irc.server, config.irc.nickname, {
|
||||
autoRejoin: config.irc.autorejoin,
|
||||
userName: config.irc.username,
|
||||
realName: config.irc.realname,
|
||||
floodProtection: config.irc.floodprotection,
|
||||
floodProtectionDelay: config.irc.floodprotectiondelay
|
||||
floodProtection: config.floodprotect.flood_protection,
|
||||
floodProtectionDelay: config.floodprotect.flood_protection_delay
|
||||
});
|
||||
|
||||
const msgTimeout = new Set();
|
||||
@ -131,7 +131,7 @@ bot.addListener('message', function(nick, to, text, from) {
|
||||
msgTimeoutMsg.add("yes");
|
||||
setTimeout(() => {
|
||||
msgTimeoutMsg.delete("yes");
|
||||
}, config.misc.command_listen_timeout)
|
||||
}, config.floodprotect.command_listen_timeout)
|
||||
}
|
||||
} else {
|
||||
var args = text.split(' ');
|
||||
@ -147,7 +147,7 @@ bot.addListener('message', function(nick, to, text, from) {
|
||||
msgTimeout.add(to);
|
||||
setTimeout(() => {
|
||||
msgTimeout.delete(to);
|
||||
}, config.misc.command_listen_timeout)
|
||||
}, config.floodprotect.command_listen_timeout)
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -10,10 +10,13 @@
|
||||
"username": "mercury",
|
||||
"realname": "git.supernets.org/hgw/mercury",
|
||||
"autorejoin": "true",
|
||||
"floodprotection": "false",
|
||||
"floodprotectiondelay": "0",
|
||||
"prefix": "m!"
|
||||
},
|
||||
"floodprotect": {
|
||||
"flood_protection": "false",
|
||||
"flood_protection_delay": "0",
|
||||
"command_listen_timeout": "2500"
|
||||
},
|
||||
"errorhandling": {
|
||||
"error_logging": "true",
|
||||
"error_channel": "#CHANNELTOSENDERRORSTO",
|
||||
@ -47,8 +50,7 @@
|
||||
},
|
||||
"misc": {
|
||||
"display_help_logo": "true",
|
||||
"logging": "true",
|
||||
"command_listen_timeout": "2500"
|
||||
"logging": "true"
|
||||
},
|
||||
"motd": {
|
||||
"enable": "true",
|
||||
|
Loading…
Reference in New Issue
Block a user