]> gitweb.pimeys.fr Git - bots/basile.git/commitdiff
Correction de la réponse au kick
authorVincent Le Gallic <legallic@crans.org>
Thu, 17 May 2012 22:53:06 +0000 (00:53 +0200)
committerVincent Le Gallic <legallic@crans.org>
Thu, 17 May 2012 22:53:06 +0000 (00:53 +0200)
basile.py

index fe10bae77e97fd0c946bbd2b1a02b376e2fa9b5b..3684c682d125e9a5d6fcc7db880d44e981eabc1e 100755 (executable)
--- a/basile.py
+++ b/basile.py
@@ -890,13 +890,13 @@ class Basile(ircbot.SingleServerIRCBot):
             log(self.serveur,"%s kické par %s (raison : %s)" %(victime,auteur,raison))
             time.sleep(2)
             serv.join(channel)
-            l1,l2=config_kick_actions,config_kick_answers
+            l1,l2=config_kick_answers,config_kick_actions
             n1,n2=len(l1),len(l2)
             i=random.randrange(n1+n2)
             if i>=n1:
-                serv.action(channel,l2[i-n1].encode("utf8"))
+                serv.action(channel,l2[i-n1].format(auteur).encode("utf8"))
             else:
-                serv.privmsg(channel,"%s: %s"%(auteur,l1[i].encode("utf8")))
+                serv.privmsg(channel,"%s: %s"%(auteur,l1[i].format(auteur).encode("utf8")))
 
     def _getnick(self):
         return self.serv.get_nickname()