From fa878a928909f17fb4a7ab278cc58fb375319be4 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 3 Sep 2003 18:45:17 +0000 Subject: [PATCH] Fixed bug in doKick. --- plugins/ChannelLogger.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/ChannelLogger.py b/plugins/ChannelLogger.py index bbdf24c96..c42dbd8a8 100644 --- a/plugins/ChannelLogger.py +++ b/plugins/ChannelLogger.py @@ -115,11 +115,18 @@ class ChannelLogger(irclib.IrcCallback): (msg.nick or msg.prefix, channel)) def doKick(self, irc, msg): - (channel, target, kickmsg) = msg.args + if len(msg.args) == 3: + (channel, target, kickmsg) = msg.args + else: + (channel, target) = msg.args + kickmsg = '' log = self.getLog(channel) self.timestamp(log) - log.write('*** %s was kicked by %s (%s)\n' % \ - (target, msg.nick, kickmsg)) + if kickmsg: + log.write('*** %s was kicked by %s (%s)\n' % \ + (target, msg.nick, kickmsg)) + else: + log.write('*** %s was kicked by %s\n' % (target, msg.nick) def doPart(self, irc, msg): for channel in msg.args[0].split(','):