From: Vincent Le Gallic Date: Fri, 16 Jun 2017 13:58:57 +0000 (+0200) Subject: Ne pas crasher sur un HELP COMMANDE d'un non-op X-Git-Url: http://gitweb.pimeys.fr/?p=bots%2Fsaturnin.git;a=commitdiff_plain;h=fde1d13125fc3e7e9ddf11d7e858cd7eed40b2c3 Ne pas crasher sur un HELP COMMANDE d'un non-op --- diff --git a/saturnin.py b/saturnin.py index 2d9b4e9..1af8794 100755 --- a/saturnin.py +++ b/saturnin.py @@ -204,6 +204,8 @@ class Saturnin(ircbot.SingleServerIRCBot): helpmsg+="\n"+helpmsgs[2] else: helpmsg=helpmsgs[2] + if not helpmsg: # Un non-op a demandé de l'aide sur une commande dont il n'est pas censé connaître l'existence + helpmsg = "Commande inacessible." for ligne in helpmsg.split("\n"): serv.privmsg(auteur,ligne) elif cmd=="join":