From: Matthew Vernon Date: Tue, 2 Aug 2011 22:02:56 +0000 (+0100) Subject: deal with empty ~blame arguments X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?p=irc.git;a=commitdiff_plain;h=6f1d44855cb937c9c6a6e59cb57524a28a7461df deal with empty ~blame arguments --- diff --git a/commands.py b/commands.py index bbcaeb8..7232bd1 100644 --- a/commands.py +++ b/commands.py @@ -300,6 +300,9 @@ def __getall(tdb,tdbk,fdb,fdbk,sdb,sdbk,what): def blameq(bot,cmd,nick,conn,public,fish,tdb,tdbk,fdb,fdbk,sdb,sdbk): clist=cmd.split() + if len(clist) < 2: + bot.automsg(public,nick,"Who or what do you want to blame?") + return cwhat=' '.join(clist[2:]) if clist[1]=="#last": ans=__getall(tdb,tdbk,fdb,fdbk,sdb,sdbk,fish.last)