From 65abedcca13fbf3a54b8636ffd4241b884d07829 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 19 Dec 2015 00:13:42 +0100 Subject: [PATCH] ChannelStats: Don't crash on messages with no argument, eg. AWAY. --- plugins/ChannelStats/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ChannelStats/plugin.py b/plugins/ChannelStats/plugin.py index 4144f0a09..82baf5b42 100644 --- a/plugins/ChannelStats/plugin.py +++ b/plugins/ChannelStats/plugin.py @@ -142,7 +142,7 @@ class StatsDB(plugins.ChannelUserDB): return UserStat(*L) def addMsg(self, msg, id=None): - if ircutils.isChannel(msg.args[0]): + if msg.args and ircutils.isChannel(msg.args[0]): channel = plugins.getChannel(msg.args[0]) if (channel, 'channelStats') not in self: self[channel, 'channelStats'] = ChannelStat()