feeling lucky
This commit is contained in:
parent
7bfb9b2f40
commit
dfdc811e24
8
bot.py
8
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}...")
|
||||
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__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user