From: Ian Jackson Date: Wed, 29 May 2019 14:18:18 +0000 (+0100) Subject: blame: Put the filename in the loadblame result X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?p=irc.git;a=commitdiff_plain;h=fe2636ef4ab3ee35896aefab0595ef09370c1aa6 blame: Put the filename in the loadblame result We are going to use this to say what kind of fish it was, in ~blame #last. We also need to change the two places where this is destructured. No functional change. Signed-off-by: Ian Jackson --- diff --git a/Servus-chiark.py b/Servus-chiark.py index 0f40c2d..6d3af24 100755 --- a/Servus-chiark.py +++ b/Servus-chiark.py @@ -70,7 +70,7 @@ def loadblame(filename): thing=' '.join(l[2:]) bdb[thing]=commit keys=bdb.keys() - return bdb,keys + return bdb,keys,filename # load a file full of flirts or trouts def __load(filename): diff --git a/commands.py b/commands.py index a574509..8cc34f0 100755 --- a/commands.py +++ b/commands.py @@ -315,9 +315,9 @@ def __getall(tdb,tdbk,fdb,fdbk,sdb,sdbk,what): return tans+fans+sans def blameq(bot,cmd,nick,conn,public,fish,cfgs): - tdb,tdbk = cfgs[0][7] # urgh, magic, to support magic knowledge below - fdb,fdbk = cfgs[1][7] - sdb,sdbk = cfgs[2][7] + 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?") @@ -327,7 +327,7 @@ def blameq(bot,cmd,nick,conn,public,fish,cfgs): if fish.last_cfg is None: bot.automsg(public,nick,"Nothing") return - xdb,xdbk = fish.last_cfg[7] + 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)