]> gitweb.pimeys.fr Git - bots/hung.git/commitdiff
foirage sur les logs
authorVincent Le Gallic <legallic@crans.org>
Mon, 14 May 2012 12:42:31 +0000 (14:42 +0200)
committerVincent Le Gallic <legallic@crans.org>
Mon, 14 May 2012 12:42:31 +0000 (14:42 +0200)
hung.py

diff --git a/hung.py b/hung.py
index e4c4615dd0f604b4edff0937fd1f2cf85688aa42..574af6867d7e46a2563364261b000306afb2038d 100755 (executable)
--- a/hung.py
+++ b/hung.py
@@ -145,12 +145,12 @@ class Hung(ircbot.SingleServerIRCBot):
                 if len(message)>1:
                     if message[1] in self.play_channels:
                         serv.privmsg(auteur,"Je play déjà sur %s."%(message[1]))
-                        log("priv",auteur," ".join(message)+"[failed]")
+                        log(self.serveur,"priv",auteur," ".join(message)+"[failed]")
                     else:
                         self.play_channels.append(message[1])
                         self.play_status[message[1]]=[None]
                         serv.privmsg(auteur,"Play channels : "+" ".join(self.play_channels))
-                        log("priv",auteur," ".join(message)+"[successful]")
+                        log(self.serveur,"priv",auteur," ".join(message)+"[successful]")
                 else:
                     serv.privmsg(auteur,"Play channels : "+" ".join(self.play_channels))
             else:
@@ -161,10 +161,10 @@ class Hung(ircbot.SingleServerIRCBot):
                     if message[1] in self.play_channels:
                         self.play_channels.remove(message[1])
                         serv.privmsg(auteur,"Play channels : "+" ".join(self.play_channels))
-                        log("priv",auteur," ".join(message)+"[successful]")
+                        log(self.serveur,"priv",auteur," ".join(message)+"[successful]")
                     else:
                         serv.privmsg(auteur,"Je ne play pas sur %s."%(message[1]))
-                        log("priv",auteur," ".join(message)+"[failed]")
+                        log(self.serveur,"priv",auteur," ".join(message)+"[failed]")
             else:
                 notunderstood=True
         elif cmd=="stay":
@@ -197,7 +197,7 @@ class Hung(ircbot.SingleServerIRCBot):
         elif cmd in ["states","status"]:
             if auteur in self.overops:
                 for k in self.play_status.keys():
-                    serv.privmsg(auteur,"%s : %s"%(k,"; ".join([str(i) for i in self.play_status[k]])))
+                    serv.privmsg(auteur,"%s : %s"%(k,"".join([str(i[0]) for i in self.play_status[k]])))
         elif cmd=="die":
             if auteur in self.overops:
                 log(self.serveur,"priv",auteur," ".join(message)+"[successful]")