Fix !roles erroring out on invalid game modes.
This commit is contained in:
parent
c84b44f004
commit
1e7783bad5
@ -6664,7 +6664,7 @@ def listroles(cli, nick, chan, rest):
|
|||||||
roleguide = getattr(mode, "ROLE_GUIDE")
|
roleguide = getattr(mode, "ROLE_GUIDE")
|
||||||
rest.pop(0)
|
rest.pop(0)
|
||||||
else:
|
else:
|
||||||
if var.GAME_MODES[gamemode][4]:
|
if gamemode in var.GAME_MODES and var.GAME_MODES[gamemode][4]:
|
||||||
txt += " {0}: {1}roles was disabled for this game mode.".format(nick, botconfig.CMD_CHAR)
|
txt += " {0}: {1}roles was disabled for this game mode.".format(nick, botconfig.CMD_CHAR)
|
||||||
else:
|
else:
|
||||||
txt += " {0}: {1} is not a valid game mode.".format(nick, rest[0])
|
txt += " {0}: {1} is not a valid game mode.".format(nick, rest[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user