From 488c7e27a9bd1fdefaf65f98f3ae121cb7094857 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 30 Jul 2012 19:38:04 +0200 Subject: [PATCH] [brown paperbag] c'est une liste ! --- config.py | 2 +- themis.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.py b/config.py index 17dddb9..857e68a 100644 --- a/config.py +++ b/config.py @@ -15,7 +15,7 @@ ops=[] report_bugs_to=["[20-100]"] # config UTF8-fail -utf8_fail = [u"Ton encodage me déprime…"] +utf8_fail_answers = [u"Ton encodage me déprime…"] utf8_trigger = True # config "tu m'traites ?" insultes=[u"conna(rd|sse)",u"pute",u"con(|ne)",u"enf(oiré|lure)", diff --git a/themis.py b/themis.py index a5c2937..bfecf44 100755 --- a/themis.py +++ b/themis.py @@ -190,7 +190,7 @@ class Themis(ircbot.SingleServerIRCBot): test=bot_unicode(message) except UnicodeBotError: if config.utf8_trigger: - serv.privmsg(auteur, config.utf8_fail) + serv.privmsg(auteur, random.choice(config.utf8_fail_answers).encode("utf8")) return message=message.split() cmd=message[0].lower() @@ -389,8 +389,8 @@ class Themis(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)) + 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) for (detect, reason) in config.kicking_list: @@ -494,8 +494,8 @@ class Themis(ircbot.SingleServerIRCBot): try: test=bot_unicode(action) except UnicodeBotError: - if not channel in self.quiet_channels and config.utf8_trigger: - serv.privmsg(channel, "%s: %s"%(auteur,config.utf8_fail)) + 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 mypseudo=self.nick -- 2.39.2