don't allow someone to !revealroles if another player under that account name is still in the game

This commit is contained in:
jacob1 2015-02-24 16:12:17 -05:00
parent 1c7a60540d
commit 58067a3264

View File

@ -6950,9 +6950,12 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
# if allowed in normal games, restrict it so that it can only be used by dead players and
# non-players (don't allow active vengeful ghosts either).
# also don't allow in-channel (e.g. make it pm only)
pl = var.list_players()
if chan != nick:
return
elif nick in var.list_players():
elif nick in pl:
return
elif nick in var.USERS and var.USERS[nick]["account"] in [var.USERS[player]["account"] for player in pl if player in var.USERS]:
return
elif nick in var.VENGEFUL_GHOSTS.keys() and var.VENGEFUL_GHOSTS[nick][0] != '!':
return