chiark / gitweb /
fish: Pass cfgs to blameq
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 May 2019 13:55:06 +0000 (14:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 May 2019 14:08:17 +0000 (15:08 +0100)
This open-coding of three separate things, with blameq having magic
knowledge of which one is which, is completely wrong.  blameq should
take a list.  The various Xdb Xdbk should in the cfgs too.

A step towards this is for blameq to get the cfgs.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Servus-chiark.py
commands.py

index 2158903c91033c6821d2e42758296bea8a264e20..828a17f2a5b465c32e2b0753dcf97f55435b2847 100755 (executable)
@@ -222,7 +222,10 @@ commands = {"karma": (c.karmaq,karmadb),
            "nws": (c.nsfwq,urldb),
            "units": c.unitq,
            "currency":c.currencyq,
-            "blame": (c.blameq,fish,tbdb,tbdbk,fbdb,fbdbk,sbdb,sbdbk),
+            "blame": (c.blameq,fish,
+                      troutcfg,tbdb,tbdbk,
+                      flirtcfg,fbdb,fbdbk,
+                      slashcfg,sbdb,sbdbk),
            "help": c.helpq,
             "say": c.sayq,
             "do": c.doq, 
index adcd273af76e4d9854b168c61c18090c9c8bbc8d..9e90ad9b17f8bd18b7c616d98e69d3c97672219e 100755 (executable)
@@ -314,7 +314,7 @@ 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,tdb,tdbk,fdb,fdbk,sdb,sdbk):
+def blameq(bot,cmd,nick,conn,public,fish,tcfg,tdb,tdbk,fcfg,fdb,fdbk,scfg,sdb,sdbk):
     clist=cmd.split()
     if len(clist) < 2:
        bot.automsg(public,nick,"Who or what do you want to blame?")