diff options
author | Chris Oliver <excid3@gmail.com> | 2010-02-13 19:58:38 -0600 |
---|---|---|
committer | Chris Oliver <excid3@gmail.com> | 2010-02-13 19:58:38 -0600 |
commit | 8d26131fcda2f04d4867257d020da4f0f29f1fa3 (patch) | |
tree | 0cc1a70da2fe3bbf191b20cfbed8dbab5e8d0492 /logbot.py | |
parent | 38b5eed20a503f8c14ed168fdd3e2cb59424dcee (diff) | |
download | logbot-8d26131fcda2f04d4867257d020da4f0f29f1fa3.tar.xz |
Missing ) and added nick/topic changes
Diffstat (limited to 'logbot.py')
-rw-r--r-- | logbot.py | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -127,6 +127,20 @@ class LogBot(SingleServerIRCBot): def on_privmsg(self, c, e): pass + def on_topic(self, c, e): + user = nm_to_n(e.source()) + channel = e.target() + topic = e.arguments()[0] + self.write(channel, self.format["topic"].replace("%user%", user) \ + .replace("%channel%", channel) \ + .replace("%topic%", topic)) + + def on_nick(self, c, e): + new = nm_to_n(e.source()) + old = e.target() + self.write(channel, self.format["nick"].replace("%old%", old) \ + .replace("%new%", new)) + def on_pubnotice(self, c, e): user = nm_to_n(e.source()) channel = e.target() @@ -232,7 +246,8 @@ def main(conf): stylesheet = CONFIG.get("log", "stylesheet") # Get the formation information - types = ["join", "kick", "mode", "part", "pubmsg", "pubnotice", "quit"] + types = ["join", "kick", "mode", "part", "pubmsg", "pubnotice", "quit", + "topic"] format = {} for type in types: format[type] = CONFIG.get("format", type) |