From: Ian Jackson Date: Wed, 29 May 2019 14:11:27 +0000 (+0100) Subject: blame #last: Blame the right thing X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~matthewv/git?a=commitdiff_plain;h=e3adecc87eb49fef56c6b1886555057d535d4d55;p=irc.git blame #last: Blame the right thing Previously this would search all the blame databases. This is wrong, it should search the one corresponding to the last fish. Now that we have last_cfg, and the db info is in the cfg, we can do that. Signed-off-by: Ian Jackson --- diff --git a/commands.py b/commands.py index a849958..a574509 100755 --- a/commands.py +++ b/commands.py @@ -324,7 +324,11 @@ def blameq(bot,cmd,nick,conn,public,fish,cfgs): 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 = 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":