From d478e6b54f194ad88a1564ee79802dec53bd64c8 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Fri, 25 May 2012 01:48:02 +0200 Subject: [PATCH] =?utf8?q?Correction=20(apr=C3=A8s=20modification=20du=20s?= =?utf8?q?ourcecode=20d'irclib=20car=20l'impl=C3=A9mentation=20=20=20de=20?= =?utf8?q?PART=20est=20incorrecte)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- hung.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hung.py b/hung.py index 6be04dd..99aa68a 100755 --- a/hung.py +++ b/hung.py @@ -29,7 +29,7 @@ config_play_channels=["#flood"] config_quiet_channels=[] config_logfile_template="hung.%s.log" def get_config_logfile(serveur): - serveurs={"acoeur.crans.org":"acoeur","irc.crans.org":"crans"} + serveurs={"acoeur.crans.org":"acoeur","irc.crans.org":"crans","localhost":"localhost"} return config_logfile_template%(serveurs[serveur]) config_overops=["[20-100]","[20-100]_","Petite-Peste","PEB"] config_ops=[] @@ -127,6 +127,7 @@ class Hung(ircbot.SingleServerIRCBot): serv.nick(config_irc_pseudo) def on_welcome(self, serv, ev): + self.serv=serv # ça serv ira :) self.give_me_my_pseudo(serv) serv.privmsg("NickServ","IDENTIFY %s"%(config_irc_password)) log(self.serveur,"Connected") @@ -432,11 +433,11 @@ class Hung(ircbot.SingleServerIRCBot): def quitter(self,chan,leave_message=None): if leave_message==None: leave_message=random.choice(config_leave_messages) - self.serv.part(chan,leave_message.encode("utf8")) + self.serv.part(chan,message=leave_message.encode("utf8")) def mourir(self): quit_message=random.choice(config_quit_messages) - self.die(message=config_quit_message) + self.die(msg=quit_message) def get_scores(self): f=open(config_scores_file) @@ -488,7 +489,8 @@ if __name__=="__main__": else: debug=False serveurs={"a♡":"acoeur.crans.org","acoeur":"acoeur.crans.org","acoeur.crans.org":"acoeur.crans.org", - "irc":"irc.crans.org","crans":"irc.crans.org","irc.crans.org":"irc.crans.org"} + "irc":"irc.crans.org","crans":"irc.crans.org","irc.crans.org":"irc.crans.org", + "localhost":"localhost"} try: serveur=serveurs[serveur] except KeyError: -- 2.39.2