]> gitweb.pimeys.fr Git - bots/basile.git/commitdiff
"Bonjour à tous"-fail
authorVincent Le Gallic <legallic@crans.org>
Tue, 26 Jun 2012 17:27:00 +0000 (19:27 +0200)
committerVincent Le Gallic <legallic@crans.org>
Tue, 26 Jun 2012 17:27:00 +0000 (19:27 +0200)
basile.py

index a0046b3631d2c5ac11734c7836e14c456cde5fc2..011dc56a18699f04d7eee861cfb2c73b189c0bd5 100755 (executable)
--- a/basile.py
+++ b/basile.py
@@ -747,8 +747,8 @@ class Basile(ircbot.SingleServerIRCBot):
             if not canal in self.quiet_channels:
                 mypseudo=self.nick
                 if re.match((u"^("+u"|".join(config.bonjour_triggers)
-                                  +u")( {}| all| tout le monde|(|à) tous)(\.|( |)!|)$"
-                             ).format(mypseudo).lower(), message.strip().lower()):
+                                  +ur")( {}| all| tout le monde| (à )?tous)(\.| ?!)?$"
+                             ).format(mypseudo).lower(), message.decode("utf8").strip().lower()):
                     answer=random.choice(config.bonjour_answers)
                     serv.privmsg(canal,answer.format(auteur).encode("utf8"))
         if (is_perdu(message) and not canal in self.quiet_channels):