Make frole only work during game
This commit is contained in:
parent
abc90530d8
commit
69f72499ef
@ -9219,7 +9219,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@cmd("frole", admin_only=True)
|
@cmd("frole", admin_only=True, phases=("day", "night"))
|
||||||
def frole(cli, nick, chan, rest):
|
def frole(cli, nick, chan, rest):
|
||||||
"""Change the role or template of a player."""
|
"""Change the role or template of a player."""
|
||||||
rst = re.split(" +",rest)
|
rst = re.split(" +",rest)
|
||||||
@ -9311,14 +9311,13 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
cli.msg(chan, messages["invalid_role"])
|
cli.msg(chan, messages["invalid_role"])
|
||||||
return
|
return
|
||||||
cli.msg(chan, messages["operation_successful"])
|
cli.msg(chan, messages["operation_successful"])
|
||||||
if var.PHASE not in ("none", "join"):
|
# default stats determination does not work if we're mucking with !frole
|
||||||
# default stats determination does not work if we're mucking with !frole
|
if var.STATS_TYPE == "default":
|
||||||
if var.STATS_TYPE == "default":
|
var.ORIGINAL_SETTINGS["STATS_TYPE"] = var.STATS_TYPE
|
||||||
var.ORIGINAL_SETTINGS["STATS_TYPE"] = var.STATS_TYPE
|
var.STATS_TYPE = "accurate"
|
||||||
var.STATS_TYPE = "accurate"
|
|
||||||
|
|
||||||
cli.msg(chan, messages["stats_accurate"].format(botconfig.CMD_CHAR))
|
cli.msg(chan, messages["stats_accurate"].format(botconfig.CMD_CHAR))
|
||||||
chk_win(cli)
|
chk_win(cli)
|
||||||
|
|
||||||
|
|
||||||
if botconfig.ALLOWED_NORMAL_MODE_COMMANDS and not botconfig.DEBUG_MODE:
|
if botconfig.ALLOWED_NORMAL_MODE_COMMANDS and not botconfig.DEBUG_MODE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user