X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fthemis.git;a=blobdiff_plain;f=themis.py;h=bfecf44944a516b96655bd10643c6c90b4f149e8;hp=a5c2937dbd7c6263b39b1fe1e00fc595b2645c98;hb=488c7e27a9bd1fdefaf65f98f3ae121cb7094857;hpb=f7a9d51c6fdb2f71f35c39498ecdc7852cfa476a 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