Ignore !notice in PM if called with arguments

This command is sometimes accidentally called in wolfchat by a message
starting with "notice". It doesn't take any arguments anyway.
This commit is contained in:
nyuszika7h 2016-07-20 00:25:03 +02:00
parent b6d07a9707
commit e04410ecaa

View File

@ -676,6 +676,12 @@ def mark_prefer_notice(cli, nick, chan, rest):
"""Makes the bot NOTICE you for every interaction."""
nick, _, ident, host = parse_nick(nick)
if chan == "nick" and rest:
# Ignore if called in PM with parameters, likely a message to wolfchat
# and not an intentional invocation of this command
return
if nick in var.USERS:
ident = var.USERS[nick]["ident"]
host = var.USERS[nick]["host"]