From 7ef7a8ccb16df25e2a7a645d95d824c4be5edca3 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 30 Jul 2012 19:37:50 +0200 Subject: [PATCH] [brown paperbag] c'est une liste ! --- hung.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hung.py b/hung.py index 96c8a58..4f70801 100755 --- a/hung.py +++ b/hung.py @@ -128,7 +128,7 @@ class Hung(ircbot.SingleServerIRCBot): test=bot_unicode(message) except UnicodeBotError: if config.utf8_trigger: - serv.privmsg(auteur, config.utf8_fail_answers) + serv.privmsg(auteur, random.choice(config.utf8_fail_answers).encode("utf8")) return message=message.split() cmd=message[0].lower() @@ -334,8 +334,8 @@ class Hung(ircbot.SingleServerIRCBot): try: test=bot_unicode(message) except UnicodeBotError: - if not canal in self.quiet_channels and config.utf8_trigger: - serv.privmsg(canal, "%s: %s"%(auteur,config.utf8_fail_answers)) + if config.utf8_trigger and not canal in self.quiet_channels: + serv.privmsg(canal, (u"%s: %s"%(auteur,random.choice(config.utf8_fail_answers))).encode("utf8")) return pour_moi,message=self.pourmoi(serv,message) if pour_moi and message.split()!=[]: -- 2.39.2