summaryrefslogtreecommitdiff
path: root/logbot.py
diff options
context:
space:
mode:
authorChris Oliver <excid3@gmail.com>2010-02-13 20:05:27 -0600
committerChris Oliver <excid3@gmail.com>2010-02-13 20:05:27 -0600
commitab8f0a30784a09feea7a037b170437b644b31ecc (patch)
treeca878076041d542a4e610da618c1332e6ebe0864 /logbot.py
parent8d26131fcda2f04d4867257d020da4f0f29f1fa3 (diff)
downloadlogbot-ab8f0a30784a09feea7a037b170437b644b31ecc.tar.xz
Working nick changes
Diffstat (limited to 'logbot.py')
-rw-r--r--logbot.py9
1 files 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)