chiark / gitweb /
fish: track last_cfg too
[irc.git] / commands.py
index 698bfdbe64c7161b83afba284a580203bfe2ff20..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!")
@@ -412,7 +414,7 @@ class UrlLog:
         n=time.localtime(time.time())
         s="%02d:%02d" % (self.localfirst.tm_hour,self.localfirst.tm_min)
         if n.tm_yday != self.localfirst.tm_yday:
-            s+=time.strftime(" on %d %B", n)
+            s+=time.strftime(" on %d %B", self.localfirst)
         return s
     def urltype(self):
         z=min(len(urlinfos)-1, self.count-1)