allow_deny: Fix stale references to 'allow'
This commit is contained in:
parent
bb6e3e9dfe
commit
aee5bce1b0
@ -5153,7 +5153,7 @@ def allow_deny(cli, nick, chan, rest, mode):
|
|||||||
|
|
||||||
if mode == "allow":
|
if mode == "allow":
|
||||||
variable = botconfig.ALLOW
|
variable = botconfig.ALLOW
|
||||||
elif mode == "deny":
|
else:
|
||||||
variable = botconfig.DENY
|
variable = botconfig.DENY
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
@ -5168,9 +5168,9 @@ def allow_deny(cli, nick, chan, rest, mode):
|
|||||||
if len(data) == 1:
|
if len(data) == 1:
|
||||||
if cloak in variable:
|
if cloak in variable:
|
||||||
msg = "\u0002{0}\u0002 ({1}) is {2} the following commands: {3}.".format(
|
msg = "\u0002{0}\u0002 ({1}) is {2} the following commands: {3}.".format(
|
||||||
data[0], cloak, "allowed" if allow else "denied", ", ".join(variable[cloak]))
|
data[0], cloak, "allowed" if mode == "allow" else "denied", ", ".join(variable[cloak]))
|
||||||
else:
|
else:
|
||||||
msg = "\u0002{0}\u0002 ({1}) is not {2} commands.".format(data[0], cloak, "allowed any special" if allow else "denied any")
|
msg = "\u0002{0}\u0002 ({1}) is not {2} commands.".format(data[0], cloak, "allowed any special" if mode == "allow" else "denied any")
|
||||||
else:
|
else:
|
||||||
commands = data[1:]
|
commands = data[1:]
|
||||||
variable[cloak] = ()
|
variable[cloak] = ()
|
||||||
@ -5181,16 +5181,16 @@ def allow_deny(cli, nick, chan, rest, mode):
|
|||||||
variable[cloak] += (command,)
|
variable[cloak] += (command,)
|
||||||
if len(variable[cloak]):
|
if len(variable[cloak]):
|
||||||
msg = "\u0002{0}\u0002 ({1}) is now {2} the following commands: {3}{4}.".format(
|
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]))
|
data[0], cloak, "allowed" if mode == "allow" else "denied", botconfig.CMD_CHAR, ", {0}".format(botconfig.CMD_CHAR).join(variable[cloak]))
|
||||||
else:
|
else:
|
||||||
del variable[cloak]
|
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")
|
msg = "\u0002{0}\u0002 ({1}) is no longer {2} commands.".format(data[0], cloak, "allowed any special" if mode == "allow" else "denied any")
|
||||||
elif variable:
|
elif variable:
|
||||||
msg = "{0}: {1}".format("allowed" if allow else "denied", ", ".join(
|
msg = "{0}: {1}".format("allowed" if mode == "allow" else "denied", ", ".join(
|
||||||
"\u0002{0}\u0002 ({1}{2})".format(cloak, botconfig.CMD_CHAR, ", {0}".format(botconfig.CMD_CHAR).join(denied))
|
"\u0002{0}\u0002 ({1}{2})".format(cloak, botconfig.CMD_CHAR, ", {0}".format(botconfig.CMD_CHAR).join(denied))
|
||||||
for cloak, denied in variable.items()))
|
for cloak, denied in variable.items()))
|
||||||
else:
|
else:
|
||||||
msg = "Nobody is {0} commands.".format("allowed any special" if allow else "denied any")
|
msg = "Nobody is {0} commands.".format("allowed any special" if mode == "allow" else "denied any")
|
||||||
|
|
||||||
if msg:
|
if msg:
|
||||||
if data:
|
if data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user