From: Hung IRC Bot Date: Tue, 15 May 2012 15:18:39 +0000 (+0200) Subject: Avec affichage de la définition correctement X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=85cad7e8e4154a14729a3e2594b4a23a27793994;p=bots%2Fhung.git Avec affichage de la définition correctement --- diff --git a/hung.py b/hung.py index 94f3952..0691b36 100755 --- 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]]