]> gitweb.pimeys.fr Git - bots/hung.git/commitdiff
Avec affichage de la définition correctement
authorHung IRC Bot <hung@crans.org>
Tue, 15 May 2012 15:18:39 +0000 (17:18 +0200)
committerHung IRC Bot <hung@crans.org>
Tue, 15 May 2012 15:18:39 +0000 (17:18 +0200)
hung.py

diff --git a/hung.py b/hung.py
index 94f3952985afe7b021599d2f3a04e6962ab374a4..0691b364cb245dbff411ada7304443497dc53c88 100755 (executable)
--- a/hung.py
+++ b/hung.py
@@ -304,7 +304,7 @@ class Hung(ircbot.SingleServerIRCBot):
                 else:
                     serv.privmsg(canal,"%s: Non, je reste !"%(auteur))
                     log(self.serveur,canal,auteur,message+"[failed]")
-            elif cmd in ["play","jeu","encore","again","partie","pendu","game","mot"]:
+            elif cmd in ["play","jeu","encore","again","partie","pendu","game","mot","go","allez"]:
                 if not canal in self.quiet_channels and canal in self.play_channels:
                     if self.play_status.has_key(canal):
                         if self.play_status[canal]==[[None,None]]:
@@ -325,7 +325,10 @@ class Hung(ircbot.SingleServerIRCBot):
                     self.play_status[canal][0]=listeapres
                     self.affiche_mot(serv, canal, begin="%s placé"%(giv_let))
                 if all([lettre[1] for lettre in listeapres]):
-                    serv.privmsg(canal,"Bravo ! C'était %s"%("".join([lettre[0] for lettre in listeapres])))
+                    realword="".join([lettre[0] for lettre in self.play_status[canal][0]])
+                    definition = self.play_status[canal][1]
+                    serv.privmsg(canal,"Bravo ! C'était %s"%(realword))
+                    serv.privmsg(canal,definition)
                     self.play_status[canal]=[[None,None]]