feeling lucky

This commit is contained in:
= 2025-04-04 04:30:48 +00:00
parent 7bfb9b2f40
commit dfdc811e24

12
bot.py
View File

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