From: Vincent Le Gallic Date: Sat, 12 May 2012 20:36:59 +0000 (+0200) Subject: La réponse au "pan" est aussi subrdonnée au quiet_channels X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fbasile.git;a=commitdiff_plain;h=4e710c08df25ff8f363a081836f8b3aa214da430 La réponse au "pan" est aussi subrdonnée au quiet_channels --- diff --git a/basile.py b/basile.py index 8de77cc..e386655 100755 --- a/basile.py +++ b/basile.py @@ -233,7 +233,7 @@ def is_action_trigger(chain,pseudo): return is_something(chain,config_action_trigger,avant=u"^", apres="( [a-z]*ment)? %s($|\.| |,|;).*"%(pseudo)) def is_pan(chain): - return re.match(u"^(pan|bim|bang)$",unicode(chain,"utf8").lower().strip()) + return re.match(u"^(pan|bim|bang) .*$",unicode(chain,"utf8").lower().strip()) @@ -808,7 +808,7 @@ class Basile(ircbot.SingleServerIRCBot): and re.match((u"^("+"|".join(config_bonjour)+").*").lower(),message.lower()) ): answer=random.choice(config_bonjour_answers) serv.privmsg(canal,answer.format(auteur).encode("utf8")) - if is_pan(message): + if is_pan(message) and not canal in self.quiet_channels: serv.privmsg(canal,"%s: c'est pas sur moi qu'il faut tirer !"%(auteur)) else: if message in ["!pain au chocolat","!chocolatine"] and not canal in self.quiet_channels: