better infilter fix

This commit is contained in:
Gordon Shumway 2019-03-05 15:50:12 -05:00 committed by GitHub
parent 4d4c116650
commit 0975f75afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -119,13 +119,13 @@ class Wordgames(callbacks.Plugin):
# 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):
if not irc.isChannel(channel) and msg.nick:
game = self._find_player_game(msg.nick)
if game and 'guess' in dir(game):
game.guess(msg.nick, msg.args[1])
return None
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:
game = self._find_player_game(msg.nick)
if game and 'guess' in dir(game):
game.guess(msg.nick, msg.args[1])
return None
# In all other cases, default to normal message handling
return self.parent.inFilter(irc, msg)