From e3adecc87eb49fef56c6b1886555057d535d4d55 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 29 May 2019 15:11:27 +0100 Subject: [PATCH] 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 --- commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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": -- 2.30.2