From 54af1fbd2d9acd14fdeca0fb625ea91816ef5c2a Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 2 Nov 2014 16:27:41 -0500 Subject: [PATCH] fix !fallow message --- modules/wolfgame.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 5f4f0ef..e36c830 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -5169,15 +5169,12 @@ def deny(cli, nick, chan, rest, allow): msg = "\u0002{0}\u0002 ({1}) is not {2} commands.".format(data[0], cloak, "allowed any special" if allow else "denied any") else: commands = data[1:] - #Error here if it's not a real command - - if len(commands): - variable[cloak] = () - for command in commands: - if command.startswith(botconfig.CMD_CHAR): - command = command[len(botconfig.CMD_CHAR):] - if (command in COMMANDS or command in PM_COMMANDS) and command not in ["fdeny", "fallow", "exec", "eval"]: - variable[cloak] += (command,) + variable[cloak] = () + for command in commands: + if command.startswith(botconfig.CMD_CHAR): + command = command[len(botconfig.CMD_CHAR):] + if (command in COMMANDS or command in PM_COMMANDS) and command not in ["fdeny", "fallow", "exec", "eval"]: + variable[cloak] += (command,) if len(variable[cloak]): msg = "\u0002{0}\u0002 ({1}) is now {2} the following commands: {3}{4}.".format( data[0], cloak, "allowed" if allow else "denied", botconfig.CMD_CHAR, ", {0}".format(botconfig.CMD_CHAR).join(variable[cloak])) @@ -5185,7 +5182,7 @@ def deny(cli, nick, chan, rest, allow): del variable[cloak] msg = "\u0002{0}\u0002 ({1}) is no longer {2} commands.".format(data[0], cloak, "allowed any special" if allow else "denied any") elif variable: - msg = "denied: {0}".format(", ".join( + msg = "{0}: {1}".format("allowed" if allow else "denied", ", ".join( "\u0002{0}\u0002 ({1}{2})".format(cloak, botconfig.CMD_CHAR, ", {0}".format(botconfig.CMD_CHAR).join(denied)) for cloak, denied in variable.items())) else: