Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/logbot.py
diff options
context:
space:
mode:
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)