From b7736d83e14aab521a816363c873b8522b8a0a68 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 3 Mar 2005 04:45:47 +0000 Subject: [PATCH] Update ChannelStats to obey channelSpecific. --- plugins/ChannelStats/plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/ChannelStats/plugin.py b/plugins/ChannelStats/plugin.py index 19ed184dd..2b70fbeb2 100644 --- a/plugins/ChannelStats/plugin.py +++ b/plugins/ChannelStats/plugin.py @@ -68,6 +68,7 @@ class ChannelStat(irclib.IrcCommandDispatcher): method(msg) def doPayload(self, channel, payload): + channel = plugins.getChannel(channel) self.chars += len(payload) self.words += len(payload.split()) fRe = conf.supybot.plugins.ChannelStats.get('frowns').get(channel)() @@ -128,8 +129,8 @@ class StatsDB(plugins.ChannelUserDB): return UserStat(*L) def addMsg(self, msg, id=None): - channel = msg.args[0] - if ircutils.isChannel(channel): + if ircutils.isChannel(msg.args[0]): + channel = plugins.getChannel(msg.args[0]) if (channel, 'channelStats') not in self: self[channel, 'channelStats'] = ChannelStat() self[channel, 'channelStats'].addMsg(msg)