chiark
/
gitweb
/
~matthewv
/
irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
blame: Put the filename in the loadblame result
[irc.git]
/
Servus-chiark.py
diff --git
a/Servus-chiark.py
b/Servus-chiark.py
index 828a17f2a5b465c32e2b0753dcf97f55435b2847..6d3af24c258625c62231c49635d0b79722e6337c 100755
(executable)
--- a/
Servus-chiark.py
+++ b/
Servus-chiark.py
@@
-70,13
+70,8
@@
def loadblame(filename):
thing=' '.join(l[2:])
bdb[thing]=commit
keys=bdb.keys()
thing=' '.join(l[2:])
bdb[thing]=commit
keys=bdb.keys()
- return bdb,keys
+ return bdb,keys
,filename
-#set up blame dbs for trouts/flirts/slashes
-tbdb,tbdbk=loadblame("trouts")
-fbdb,fbdbk=loadblame("flirts")
-sbdb,sbdbk=loadblame("slashes")
-
# load a file full of flirts or trouts
def __load(filename):
try:
# load a file full of flirts or trouts
def __load(filename):
try:
@@
-95,7
+90,9
@@
troutcfg = (
"Who do you wish me to trout?",
"Fish stocks exhausted.",
fish,
"Who do you wish me to trout?",
"Fish stocks exhausted.",
fish,
- 0.1)
+ 0.1,
+ loadblame("trouts"),
+ )
flirtcfg = (
__load("flirts"),
flirtcfg = (
__load("flirts"),
@@
-104,7
+101,9
@@
flirtcfg = (
"Who do you wish me to flirt with?",
"My libido is over-used!",
fish,
"Who do you wish me to flirt with?",
"My libido is over-used!",
fish,
- 0.1)
+ 0.1,
+ loadblame("flirts"),
+ )
slashcfg= (
__load("slashes"),
slashcfg= (
__load("slashes"),
@@
-113,7
+112,9
@@
slashcfg= (
"Who do you want to slash?",
"I have writer's block!",
fish,
"Who do you want to slash?",
"I have writer's block!",
fish,
- 0.1)
+ 0.1,
+ loadblame("slashes")
+ )
# Hacky command to output the current fishpond state
def fishq(bot, cmd, nick, conn, public,f):
# Hacky command to output the current fishpond state
def fishq(bot, cmd, nick, conn, public,f):
@@
-222,10
+223,7
@@
commands = {"karma": (c.karmaq,karmadb),
"nws": (c.nsfwq,urldb),
"units": c.unitq,
"currency":c.currencyq,
"nws": (c.nsfwq,urldb),
"units": c.unitq,
"currency":c.currencyq,
- "blame": (c.blameq,fish,
- troutcfg,tbdb,tbdbk,
- flirtcfg,fbdb,fbdbk,
- slashcfg,sbdb,sbdbk),
+ "blame": (c.blameq,fish, [troutcfg,flirtcfg,slashcfg]),
"help": c.helpq,
"say": c.sayq,
"do": c.doq,
"help": c.helpq,
"say": c.sayq,
"do": c.doq,