feeling lucky
This commit is contained in:
parent
7bfb9b2f40
commit
dfdc811e24
12
bot.py
12
bot.py
@ -163,12 +163,12 @@ class IRCBot():
|
|||||||
continue
|
continue
|
||||||
channel_time = self.check_time(channel)
|
channel_time = self.check_time(channel)
|
||||||
now = time()
|
now = time()
|
||||||
if self.counter(channel) < messages_within_timeout:
|
count = self.counter(channel)
|
||||||
if now - channel_time > timeout:
|
if now - channel_time > timeout and count > messages_within_timeout:
|
||||||
self.send("#bots", f"i hear activity in {channel}...")
|
self.config["counts"][channel] = 0
|
||||||
# self.send("#tildetown", f"i hear activity in {channel}...")
|
self.write_config()
|
||||||
self.config["counts"][channel] = 0
|
self.send("#bots", f"i hear activity in {channel}...")
|
||||||
self.write_config()
|
# self.send("#tildetown", f"i hear activity in {channel}...")
|
||||||
self.set_time(channel, now)
|
self.set_time(channel, now)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user