]> gitweb.pimeys.fr Git - bots/themis.git/blobdiff - themis.py
[brown paperbag] c'est une liste !
[bots/themis.git] / themis.py
index a5c2937dbd7c6263b39b1fe1e00fc595b2645c98..bfecf44944a516b96655bd10643c6c90b4f149e8 100755 (executable)
--- 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