]> gitweb.pimeys.fr Git - bots/hung.git/commitdiff
On peut mettre autre chose après une proposition de mot
authorHung IRC Bot <hung@crans.org>
Fri, 14 Jun 2013 15:40:34 +0000 (17:40 +0200)
committerHung IRC Bot <hung@crans.org>
Fri, 14 Jun 2013 15:40:34 +0000 (17:40 +0200)
hung.py

diff --git a/hung.py b/hung.py
index 7b848186bd67cfa2b9d3adc62b031b2f06ed906f..d91e4e0fa995cd837316c6c45d78589866ee514d 100755 (executable)
--- a/hung.py
+++ b/hung.py
@@ -75,7 +75,7 @@ def is_mot(mot,liste):
     real_word = "".join([lettre[0] for lettre in liste])
     real_word = real_word.decode("utf8").lower()
     mot=remplace_accents(mot.decode("utf8"))
     real_word = "".join([lettre[0] for lettre in liste])
     real_word = real_word.decode("utf8").lower()
     mot=remplace_accents(mot.decode("utf8"))
-    return mot==real_word
+    return mot.startswith(real_word)
 
 class Hung(ircbot.SingleServerIRCBot):
     def __init__(self,serveur,debug=False):
 
 class Hung(ircbot.SingleServerIRCBot):
     def __init__(self,serveur,debug=False):