From e33b358512a3c5f712cf1873c3d76630c132b2aa Mon Sep 17 00:00:00 2001 From: Gordon Shumway <39967334+oddluck@users.noreply.github.com> Date: Mon, 4 Mar 2019 05:57:22 -0500 Subject: [PATCH] fix infilter error when msg.args not present --- WordGames/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordGames/plugin.py b/WordGames/plugin.py index faab345..e5650a9 100644 --- a/WordGames/plugin.py +++ b/WordGames/plugin.py @@ -117,7 +117,8 @@ class Wordgames(callbacks.Plugin): def inFilter(self, irc, msg): # Filter out private messages to the bot when they don't use the # command prefix and the nick is currently playing a guessing game. - channel = msg.args[0] + if len(msg.args) > 0: + channel = msg.args[0] commandChars = conf.supybot.reply.whenAddressedBy.chars if msg.command == 'PRIVMSG' and msg.args[1][0] not in str(commandChars): if not irc.isChannel(channel) and msg.nick: