Fix !fgame check for admins/owners
This commit is contained in:
parent
84b2fdc24e
commit
2e5b087d3b
@ -5572,8 +5572,10 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
cli.msg(chan, s)
|
cli.msg(chan, s)
|
||||||
|
|
||||||
|
|
||||||
@cmd("fgame", admin_only=True)
|
@cmd("fgame", admin_only=True, raw_nick=True)
|
||||||
def fgame(cli, nick, chan, rest):
|
def fgame(cli, nick, chan, rest):
|
||||||
|
(nick, _, __, cloak) = parse_nick(rawnick)
|
||||||
|
|
||||||
pl = var.list_players()
|
pl = var.list_players()
|
||||||
|
|
||||||
if var.PHASE == 'none':
|
if var.PHASE == 'none':
|
||||||
@ -5584,7 +5586,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
cli.notice(nick, 'Werewolf is already in play.')
|
cli.notice(nick, 'Werewolf is already in play.')
|
||||||
return
|
return
|
||||||
|
|
||||||
if nick not in pl and nick not in botconfig.ADMINS + botconfig.OWNERS:
|
if nick not in pl and cloak not in botconfig.ADMINS + botconfig.OWNERS:
|
||||||
cli.notice(nick, 'You\'re currently not playing.')
|
cli.notice(nick, 'You\'re currently not playing.')
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -5592,10 +5594,11 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
|
|
||||||
if rest:
|
if rest:
|
||||||
if cgamemode(cli, rest):
|
if cgamemode(cli, rest):
|
||||||
cli.msg(chan, ("\u0002{0}\u0002 has changed the "+
|
cli.msg(chan, ('\u0002{}\u0002 has changed the game settings '
|
||||||
"game settings successfully.").format(nick))
|
'successfully.').format(nick))
|
||||||
|
|
||||||
def fgame_help(args = ""):
|
|
||||||
|
def fgame_help(args=''):
|
||||||
args = args.strip()
|
args = args.strip()
|
||||||
|
|
||||||
if not args:
|
if not args:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user