Misc: Fix log message on invalid commands in private

It showed 'Not replying to <command> 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.
This commit is contained in:
Valentin Lorentz 2020-09-30 10:25:22 +02:00
parent 48b24769c2
commit 16b7fd9f37

View File

@ -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)()