From dfdc811e2458a717b2e8e532027dc177fb5b904c Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 4 Apr 2025 04:30:48 +0000 Subject: [PATCH] feeling lucky --- bot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bot.py b/bot.py index fb36065..13cca9e 100644 --- a/bot.py +++ b/bot.py @@ -163,12 +163,12 @@ class IRCBot(): continue channel_time = self.check_time(channel) now = time() - if self.counter(channel) < messages_within_timeout: - if now - channel_time > timeout: - self.send("#bots", f"i hear activity in {channel}...") - # self.send("#tildetown", f"i hear activity in {channel}...") - self.config["counts"][channel] = 0 - self.write_config() + count = self.counter(channel) + if now - channel_time > timeout and count > messages_within_timeout: + self.config["counts"][channel] = 0 + self.write_config() + self.send("#bots", f"i hear activity in {channel}...") + # self.send("#tildetown", f"i hear activity in {channel}...") self.set_time(channel, now) if __name__ == "__main__":