prevent command timeout from picking up on non client-directed messages
This commit is contained in:
parent
bc6f27f72d
commit
129d77efd6
2
bot.js
2
bot.js
@ -123,6 +123,7 @@ async function twitter(chan, provfeed, n) {
|
||||
}
|
||||
|
||||
bot.addListener('message', function(nick, to, text, from) {
|
||||
if (text.startsWith(config.irc.prefix)) {
|
||||
if (msgTimeout.has(to)) {
|
||||
if (msgTimeoutMsg.has("yes")) {
|
||||
return;
|
||||
@ -149,6 +150,7 @@ bot.addListener('message', function(nick, to, text, from) {
|
||||
msgTimeout.delete(to);
|
||||
}, config.floodprotect.command_listen_timeout)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
bot.addListener('error', function(message) {
|
||||
|
Loading…
Reference in New Issue
Block a user