]> gitweb.pimeys.fr Git - bots/basile.git/commitdiff
Ajout des adverbes dans les action_trigger
authorVincent Le Gallic <legallic@crans.org>
Thu, 10 May 2012 21:30:50 +0000 (23:30 +0200)
committerVincent Le Gallic <legallic@crans.org>
Thu, 10 May 2012 21:30:50 +0000 (23:30 +0200)
basile.py

index b403352ef0246bb18eeaddfe9afb1bc270814293..fdefe8dda02bef8c8b7d8405e0ce034fb6345ee4 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())