prevent command timeout from picking up on non client-directed messages

This commit is contained in:
hgw 2023-10-02 02:11:27 +00:00
parent bc6f27f72d
commit 129d77efd6

2
bot.js
View File

@ -123,6 +123,7 @@ async function twitter(chan, provfeed, n) {
} }
bot.addListener('message', function(nick, to, text, from) { bot.addListener('message', function(nick, to, text, from) {
if (text.startsWith(config.irc.prefix)) {
if (msgTimeout.has(to)) { if (msgTimeout.has(to)) {
if (msgTimeoutMsg.has("yes")) { if (msgTimeoutMsg.has("yes")) {
return; return;
@ -149,6 +150,7 @@ bot.addListener('message', function(nick, to, text, from) {
msgTimeout.delete(to); msgTimeout.delete(to);
}, config.floodprotect.command_listen_timeout) }, config.floodprotect.command_listen_timeout)
} }
}
}); });
bot.addListener('error', function(message) { bot.addListener('error', function(message) {