times_up_sentences = [u"I stayed alive, you're too slow !!!"]
ignored_pseudos = r'^Soldat\d+$'
+ignored_pan_masks = [r'*!leger@zamok.crans.org', u"jben!*@*"]
regexp_pan = re.compile(u".*(" + "|".join(config.killwords) + u").*")
def is_pan(chain):
return regexp_pan.match(unicode(chain,"utf8").lower())
+def ignore_pan(serv, ev):
+ """Retourne ``True`` si il faut ignorer ce pan."""
+ for (blackmask, exceptmask) in config.ignored_pan_masks:
+ usermask = ev.source()
+ return bool(irclib.mask_matches(usermask, blackmask) and not irclib.mask_matches(usermasl, exceptmask))
class UnicodeBotError(Exception):
pass
self.sendscores(auteur)
else:
if is_pan(message):
+ if ignore_pan(serv, ev):
+ return
self.shot(channel, auteur)
def on_action(self, serv, ev):