From: Vincent Le Gallic Date: Sun, 26 May 2013 19:13:56 +0000 (+0200) Subject: Stay away from here, cretin X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=874e2ca6c7f6355b905a597a4cd9c224b3ac360c;p=bots%2Fhung.git Stay away from here, cretin --- diff --git a/config.py b/config.py index 0eda449..b02816f 100644 --- a/config.py +++ b/config.py @@ -7,7 +7,7 @@ irc_password="I'mAHungMan" irc_pseudo="hung" chanlist=["#bot","#flood"] stay_channels=["#bot","#flood"] -play_channels=["#flood"] +play_channels=["#bot","#flood"] quiet_channels=[] logfile_template="hung.%s.log" diff --git a/hung.py b/hung.py index 99c934d..7616802 100755 --- a/hung.py +++ b/hung.py @@ -424,7 +424,7 @@ class Hung(ircbot.SingleServerIRCBot): serv.privmsg(canal,"%s: %s"%(auteur,ligne.encode("utf8"))) # on essaye de voir si le mot fourni matche la partie en cours mot = cmd - if self.play_status[canal][0]!=None and is_mot(mot, self.play_status[canal][0]): + if canal in self.play_channels and self.play_status[canal][0]!=None and is_mot(mot, self.play_status[canal][0]): # on a trouvé le mot # on regarde combien de lettre il manquait manquait = sum([not lettre[1] for lettre in self.play_status[canal][0]])