chiark
/
gitweb
/
~matthewv
/
irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new flirts from rejs
[irc.git]
/
Servus-chiark.py
diff --git
a/Servus-chiark.py
b/Servus-chiark.py
index 2158903c91033c6821d2e42758296bea8a264e20..f0be526abdf5f855cf5cb77ac6ac126032397c23 100755
(executable)
--- a/
Servus-chiark.py
+++ b/
Servus-chiark.py
@@
-42,17
+42,15
@@
import commands as c
# This fishpond is shared between trouts and flirts. It doesn't have to be;
# you can define as many ponds as you like.
# This fishpond is shared between trouts and flirts. It doesn't have to be;
# you can define as many ponds as you like.
-class
fish
:
+class
Fish (c.FishPond)
:
cur_fish=5
max_fish=5
nofish_time=60
fish_time_inc=60
fish_inc=2
cur_fish=5
max_fish=5
nofish_time=60
fish_time_inc=60
fish_inc=2
- DoS=0
Boring_Git='Nobody'
Boring_Git='Nobody'
- quotatime=0
- last=""
- last_cfg=None
+
+fish = Fish()
# load the "blame" details for a file
def loadblame(filename):
# load the "blame" details for a file
def loadblame(filename):
@@
-70,13
+68,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
+88,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
+99,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
+110,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,7
+221,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,
tbdb,tbdbk,fbdb,fbdbk,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,