From e04410ecaa8aa57ce64580b36053b5f223f0fa36 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Wed, 20 Jul 2016 00:25:03 +0200 Subject: [PATCH] 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. --- src/wolfgame.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wolfgame.py b/src/wolfgame.py index 61a89f0..909417a 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -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"]