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__":