Fix admin check in fdie and frestart
This commit is contained in:
parent
ff737609b5
commit
db9c52a3e2
@ -377,14 +377,12 @@ def make_stasis(nick, penalty):
|
|||||||
var.STASISED[cloak] += penalty
|
var.STASISED[cloak] += penalty
|
||||||
var.set_stasis(cloak, var.STASISED[cloak])
|
var.set_stasis(cloak, var.STASISED[cloak])
|
||||||
|
|
||||||
@pmcmd("fdie", "fbye", raw_nick=True)
|
@pmcmd("fdie", "fbye")
|
||||||
@cmd("fdie", "fbye", raw_nick=True)
|
@cmd("fdie", "fbye")
|
||||||
def forced_exit(cli, raw_nick, chan, *rest): # Admin Only
|
def forced_exit(cli, nick, chan, *rest): # Admin Only
|
||||||
"""Forces the bot to close."""
|
"""Forces the bot to close."""
|
||||||
|
|
||||||
(nick, _, _, cloak) = parse_nick(raw_nick)
|
if nick != "<console>" and not is_admin(nick):
|
||||||
|
|
||||||
if nick != "<console>" and not var.is_admin(cloak):
|
|
||||||
cli.notice(nick, "You are not an admin.")
|
cli.notice(nick, "You are not an admin.")
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -405,13 +403,11 @@ def forced_exit(cli, raw_nick, chan, *rest): # Admin Only
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@cmd("frestart", raw_nick=True)
|
@cmd("frestart")
|
||||||
def restart_program(cli, raw_nick, chan, rest):
|
def restart_program(cli, nick, chan, rest):
|
||||||
"""Restarts the bot."""
|
"""Restarts the bot."""
|
||||||
|
|
||||||
(nick, _, _, cloak) = parse_nick(raw_nick)
|
if nick != "<console>" and not is_admin(nick):
|
||||||
|
|
||||||
if nick != "<console>" and not var.is_admin(cloak):
|
|
||||||
cli.notice(nick, "You are not an admin.")
|
cli.notice(nick, "You are not an admin.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user