Added NICK change logging support. It's absolutely unbelievable that no one complained about it until now.

This commit is contained in:
Jeremy Fincher 2004-10-19 17:09:11 +00:00
parent 10fc3bf42a
commit 3bc1a1fa8b

View File

@ -236,6 +236,13 @@ class ChannelLogger(callbacks.Privmsg):
if ircutils.isChannel(channel): if ircutils.isChannel(channel):
self.doLog(irc, channel, '-%s- %s\n' % (msg.nick, text)) self.doLog(irc, channel, '-%s- %s\n' % (msg.nick, text))
def doNick(self, irc, msg):
oldNick = msg.nick
newNick = msg.args[0]
for (channel, c) in irc.state.channels.iteritems():
if newNick in c.users:
self.doLog(irc, channel,
'*** %s is now known as %s\n' % (oldNick, newNick))
def doJoin(self, irc, msg): def doJoin(self, irc, msg):
for channel in msg.args[0].split(','): for channel in msg.args[0].split(','):
self.doLog(irc, channel, self.doLog(irc, channel,