From 4a810a7905d843277809aef791b4b6ec9add03f2 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Thu, 10 May 2012 19:52:51 +0200 Subject: [PATCH] =?utf8?q?Pr=C3=A9caution=20encodage=20foireux=20dans=20on?= =?utf8?q?=5Faction?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- basile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/basile.py b/basile.py index 1e985a0..e7ed6ca 100755 --- a/basile.py +++ b/basile.py @@ -825,7 +825,14 @@ class Basile(ircbot.SingleServerIRCBot): action = ev.arguments()[0] auteur = irclib.nm_to_n(ev.source()) channel = ev.target() + try: + test=bot_unicode(message) + except UnicodeBotError: + serv.privmsg(channel, + "%s : Euh, tu fais de la merde avec ton encodage là, j'ai failli crasher…"%(auteur)) + return mypseudo=serv.get_nickname() + if is_action_trigger(action,mypseudo): l1,l2=config_action_answers,config_action_actions n1,n2=len(l1),len(l2) -- 2.39.2