prevent crashing if !fgame is given invalid arguments
This commit is contained in:
parent
e32c66b632
commit
04b29cb428
@ -2071,6 +2071,11 @@ def cgamemode(cli, *args):
|
|||||||
|
|
||||||
for arg in args:
|
for arg in args:
|
||||||
modeargs = arg.split("=", 1)
|
modeargs = arg.split("=", 1)
|
||||||
|
|
||||||
|
if len(modeargs) < 2: # no equal sign in the middle of the arg
|
||||||
|
cli.msg(botconfig.CHANNEL, "Invalid syntax.")
|
||||||
|
return False
|
||||||
|
|
||||||
modeargs[0] = modeargs[0].strip()
|
modeargs[0] = modeargs[0].strip()
|
||||||
if modeargs[0] in var.GAME_MODES.keys():
|
if modeargs[0] in var.GAME_MODES.keys():
|
||||||
md = modeargs.pop(0)
|
md = modeargs.pop(0)
|
||||||
|
@ -127,10 +127,6 @@ CHANGEABLE_ROLES = { "seers" : INDEX_OF_ROLE["seer"],
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@game_mode("normal")
|
|
||||||
class Normal(object):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: implement game modes
|
# TODO: implement game modes
|
||||||
@game_mode("roles")
|
@game_mode("roles")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user