]> gitweb.pimeys.fr Git - bots/basile.git/blobdiff - basile.py
fucking espace manquant
[bots/basile.git] / basile.py
index 484d77bfb22a6f31164e8663ce29949b97e87f49..b881878aaf1434fbfccb95ca662703bbd0c6d1f9 100755 (executable)
--- a/basile.py
+++ b/basile.py
@@ -230,7 +230,8 @@ def is_merci(chain):
 def is_tamere(chain):
     return is_something(chain,config_tamere)
 def is_action_trigger(chain,pseudo):
-    return is_something(chain,config_action_trigger,avant=u"^",apres=" %s($|\.| |,|;).*"%(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())
 
@@ -827,7 +828,7 @@ class Basile(ircbot.SingleServerIRCBot):
         auteur = irclib.nm_to_n(ev.source())
         channel = ev.target()
         try:
-            test=bot_unicode(message)
+            test=bot_unicode(action)
         except UnicodeBotError:
             serv.privmsg(channel,
               "%s : Euh, tu fais de la merde avec ton encodage là, j'ai failli crasher…"%(auteur))