X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=deconnaisseur.py;h=77497dbc6069516779c2bb2c4fc42b366d456b22;hb=7f1f1c98d3bd874416677dd8939a26d9ae535a63;hp=7bff5300a53b2c6bae51d5e0c14658f707d2f67f;hpb=cce3cb510a189f60a1221c1f8b87aceded6c2517;p=bots%2Fdeconnaisseur.git diff --git a/deconnaisseur.py b/deconnaisseur.py index 7bff530..77497db 100755 --- a/deconnaisseur.py +++ b/deconnaisseur.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 def reussi(message,answer,answer_regexp,auteur): if auteur in config.level3: @@ -120,7 +121,6 @@ class Deconnaisseur(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] @@ -612,7 +612,8 @@ class Deconnaisseur(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]