X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=historien.py;h=e37cbb55182547ab806b7f68a4e06176ef084e41;hb=5727848b9f5db55e760631dadae9ee941bf46ca2;hp=33b9af6aead17df74347160629a0ed2ed3736d7f;hpb=602331d4815e721be1f8fcffa81391b3ba681a4b;p=bots%2Fhistorien.git diff --git a/historien.py b/historien.py index 33b9af6..e37cbb5 100755 --- a/historien.py +++ b/historien.py @@ -60,7 +60,8 @@ def ignore_event(serv, ev): else: exceptit = bool(irclib.mask_matches(usermask, exceptmask)) blackit = bool(irclib.mask_matches(usermask, blackmask)) - return blackit and not exceptit + if blackit and not exceptit: + return True class GoodCentury(Exception): pass @@ -142,7 +143,6 @@ class Historien(ircbot.SingleServerIRCBot): for c in self.chanlist: log(self.serveur,"JOIN %s"%(c)) serv.join(c) - self.update_activity(c,force=True) for c in self.play_channels: token=time.time()-3600 self.play_status[c]=[0,token] @@ -662,7 +662,8 @@ class Historien(ircbot.SingleServerIRCBot): if force or (not pseudo in config.idle_bots and all([not re.match(ignore, message) for ignore in config.idle_messages])): self.last_activity[canal]=time.time() def is_active(self,canal): - return time.time()-self.last_activity[canal]