chiark / gitweb /
fish: track last_cfg too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 May 2019 13:50:03 +0000 (14:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 May 2019 13:58:14 +0000 (14:58 +0100)
No-one uses this yet.  So no functional change.

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

index 15ff6b5a3caba11c55dab36001e072a8437a11ab..2158903c91033c6821d2e42758296bea8a264e20 100755 (executable)
@@ -52,6 +52,7 @@ class fish:
        Boring_Git='Nobody'
        quotatime=0
        last=""
+       last_cfg=None
 
 # load the "blame" details for a file
 def loadblame(filename):
index 5f436c63fd2b41f95a62399a5893a294939517db..adcd273af76e4d9854b168c61c18090c9c8bbc8d 100755 (executable)
@@ -94,6 +94,7 @@ def troutq(bot, cmd, nick, conn, public, cfg):
     me = bot.connection.get_nickname()
     trout_msg = random.choice(fishlist)
     fishpond.last=trout_msg
+    fishpond.last_cfg=cfg
     # The bot won't trout or flirt with itself;
     if irc_lower(me) == irc_lower(target) or irc_lower(target) in synonyms:
         target = nick
@@ -135,6 +136,7 @@ def slashq(bot, cmd, nick, conn, public, cfg):
     me = bot.connection.get_nickname()
     slash_msg = random.choice(fishlist)
     fishpond.last=slash_msg
+    fishpond.last_cfg=cfg
     # The bot won't slash people with themselves
     if irc_lower(who[0]) == irc_lower(who[1]):
        conn.notice(nick, "oooooh no missus!")