if config.debug_stdout:
print chain
+def ignore_event(serv, ev):
+ """Retourne ``True`` si il faut ignorer cet évènement."""
+ for (blackmask, exceptmask) in config.blacklisted_masks:
+ usermask = ev.source()
+ if exceptmask is None:
+ exceptit = False
+ else:
+ exceptit = bool(irclib.mask_matches(usermask, exceptmask))
+ blackit = bool(irclib.mask_matches(usermask, blackmask))
+ return blackit and not exceptit
+
def regex_join(liste, avant=u".*(?:^| )", apres=u"(?:$|\.| |,|;).*"):
"""Fabrique une regexp à partir d'une liste d'éléments à matcher."""
return avant + u"(" + u"|".join(liste) + u")" + apres