From 4e710c08df25ff8f363a081836f8b3aa214da430 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Sat, 12 May 2012 22:36:59 +0200 Subject: [PATCH] =?utf8?q?La=20r=C3=A9ponse=20au=20"pan"=20est=20aussi=20s?= =?utf8?q?ubrdonn=C3=A9e=20au=20quiet=5Fchannels?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- basile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.39.2