From 82ed771b9e5f6a5f1be00168bb5bbdd5c034cc39 Mon Sep 17 00:00:00 2001 From: resistivecorpse Date: Tue, 25 Sep 2012 01:11:09 -0400 Subject: [PATCH] minor fixes to ChannelLogger --- plugins/ChannelLogger/plugin.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/ChannelLogger/plugin.py b/plugins/ChannelLogger/plugin.py index ec51b09dd..b431c99a1 100644 --- a/plugins/ChannelLogger/plugin.py +++ b/plugins/ChannelLogger/plugin.py @@ -206,8 +206,8 @@ class ChannelLogger(callbacks.Plugin): self.doLog(irc, channel, '*** %s is now known as %s\n', oldNick, newNick) def doJoin(self, irc, msg): - if(self.registryValue('showJoinParts', msg.args[0])): - for channel in msg.args[0].split(','): + for channel in msg.args[0].split(','): + if(self.registryValue('showJoinParts', msg.args[0])): self.doLog(irc, channel, '*** %s <%s> has joined %s\n', msg.nick, msg.prefix, channel) @@ -227,12 +227,12 @@ class ChannelLogger(callbacks.Plugin): '*** %s was kicked by %s\n', target, msg.nick) def doPart(self, irc, msg): - if(self.registryValue('showJoinParts', msg.args[0])): - if len(msg.args) > 1: - reason = " (%s)" % msg.args[1] - else: - reason = "" - for channel in msg.args[0].split(','): + if len(msg.args) > 1: + reason = " (%s)" % msg.args[1] + else: + reason = "" + for channel in msg.args[0].split(','): + if(self.registryValue('showJoinParts', msg.args[0])): self.doLog(irc, channel, '*** %s <%s> has left %s%s\n', msg.nick, msg.prefix, channel, reason) @@ -260,7 +260,7 @@ class ChannelLogger(callbacks.Plugin): if not isinstance(irc, irclib.Irc): irc = irc.getRealIrc() for (channel, chan) in self.lastStates[irc].channels.iteritems(): - if(self.registryValue('showJoinParts', msg.args[0])): + if(self.registryValue('showJoinParts', channel)): if msg.nick in chan.users: self.doLog(irc, channel, '*** %s <%s> has quit IRC%s\n',