From 16b7fd9f3777993cd5c911d2e2aa2ae17d658d8c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 30 Sep 2020 10:25:22 +0200 Subject: [PATCH] Misc: Fix log message on invalid commands in private It showed 'Not replying to in None,', since channel is None in private (unlike the former msg.args[0], which was the bot's nick). I wasn't careful enough when I replaced msg.args[0] with msg.channel across the codebase. --- plugins/Misc/plugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 6439e6242..0d44afda7 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -168,8 +168,7 @@ class Misc(callbacks.Plugin): # echo [] will get us an empty token set, but there's no need # to log this in that case anyway, it being a nested command. self.log.info('Not replying to %s in %s, not a command.', - tokens[0], channel - if channel != irc.nick else _('private')) + tokens[0], channel or _('private')) if irc.nested: bracketConfig = conf.supybot.commands.nested.brackets brackets = bracketConfig.getSpecific(irc.network, channel)()