From 43f389e037d4c0ca63836a792e1c4a2cbe10946f Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Fri, 4 May 2012 18:25:15 +0200 Subject: [PATCH] =?utf8?q?plantit=20sur=20un=20message=20contitu=C3=A9=20u?= =?utf8?q?niquement=20de=20"Basile"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- basile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basile.py b/basile.py index 14769c3..cb69a9f 100755 --- a/basile.py +++ b/basile.py @@ -379,7 +379,7 @@ class Basile(ircbot.SingleServerIRCBot): """renvoie (False,lemessage) ou (True, le message amputé de "pseudo: ")""" pseudo=serv.get_nickname() size=len(pseudo) - if message[:size]==pseudo and message[size]==":": + if message[:size]==pseudo and len(message)>size and message[size]==":": return (True,message[size+1:].lstrip(" ")) else: return (False,message) -- 2.39.2