X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?a=blobdiff_plain;f=commands.py;h=8cc34f03ac6f4dc4997b4f435523842bc7b40601;hb=fe2636ef4ab3ee35896aefab0595ef09370c1aa6;hp=9e90ad9b17f8bd18b7c616d98e69d3c97672219e;hpb=5bf30b6ddca2d6aa9384917324e442415368b799;p=irc.git diff --git a/commands.py b/commands.py index 9e90ad9..8cc34f0 100755 --- a/commands.py +++ b/commands.py @@ -314,14 +314,21 @@ def __getall(tdb,tdbk,fdb,fdbk,sdb,sdbk,what): sans=__getcommits(sdb,sdbk,what) return tans+fans+sans -def blameq(bot,cmd,nick,conn,public,fish,tcfg,tdb,tdbk,fcfg,fdb,fdbk,scfg,sdb,sdbk): +def blameq(bot,cmd,nick,conn,public,fish,cfgs): + tdb,tdbk,x = cfgs[0][7] # urgh, magic, to support magic knowledge below + fdb,fdbk,x = cfgs[1][7] + sdb,sdbk,x = cfgs[2][7] 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) + if fish.last_cfg is None: + bot.automsg(public,nick,"Nothing") + return + xdb,xdbk,kindsfile = fish.last_cfg[7] + ans=__getcommits(xdb,xdbk,fish.last) elif clist[1]=="#trouts" or clist[1]=="#trout": ans=__getcommits(tdb,tdbk,cwhat) elif clist[1]=="#flirts" or clist[1]=="#flirt":