fix infilter error when msg.args not present

This commit is contained in:
Gordon Shumway 2019-03-04 05:57:22 -05:00 committed by GitHub
parent 96c504261f
commit e33b358512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,6 +117,7 @@ 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.
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):