]> gitweb.pimeys.fr Git - bots/hung.git/commitdiff
Stay away from here, cretin
authorVincent Le Gallic <legallic@crans.org>
Sun, 26 May 2013 19:13:56 +0000 (21:13 +0200)
committerVincent Le Gallic <legallic@crans.org>
Sun, 26 May 2013 19:13:56 +0000 (21:13 +0200)
config.py
hung.py

index 0eda4499bef4c5ff596f68aa8ee959d0b98b5375..b02816fd565ce472574f0fc2958f57138bfb7f5d 100644 (file)
--- 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 99c934dcb6d9fba8cab60ef81de21a8a4cf33eda..76168026bb3d7447c32db8c8ca5dc93bce37dedd 100755 (executable)
--- 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]])