From ab8f0a30784a09feea7a037b170437b644b31ecc Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Sat, 13 Feb 2010 20:05:27 -0600 Subject: Working nick changes --- logbot.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/logbot.py b/logbot.py index 1abcd27..5afb684 100644 --- a/logbot.py +++ b/logbot.py @@ -138,7 +138,7 @@ class LogBot(SingleServerIRCBot): def on_nick(self, c, e): new = nm_to_n(e.source()) old = e.target() - self.write(channel, self.format["nick"].replace("%old%", old) \ + self.write(None, self.format["nick"].replace("%old%", old) \ .replace("%new%", new)) def on_pubnotice(self, c, e): @@ -153,7 +153,6 @@ class LogBot(SingleServerIRCBot): user = nm_to_n(e.source()) reason = e.arguments()[0] channel = e.target() - print channel self.write(channel, self.format["quit"].replace("%user%", user) \ .replace("%reason%", reason)) @@ -164,7 +163,7 @@ class LogBot(SingleServerIRCBot): print "%s> %s %s" % (channel, time, message) channels = [channel] else: - # Quits don't have channels + # Quit/nick don't have channels print "%s %s" % (time, message) channels = self.chans @@ -246,8 +245,8 @@ def main(conf): stylesheet = CONFIG.get("log", "stylesheet") # Get the formation information - types = ["join", "kick", "mode", "part", "pubmsg", "pubnotice", "quit", - "topic"] + types = ["join", "kick", "mode", "nick", "part", "pubmsg", "pubnotice", + "quit", "topic"] format = {} for type in types: format[type] = CONFIG.get("format", type) -- cgit v1.2.3-70-g09d2