From 58067a326462cd94750bdac7be8a4d6207b7de24 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Tue, 24 Feb 2015 16:12:17 -0500 Subject: [PATCH] don't allow someone to !revealroles if another player under that account name is still in the game --- modules/wolfgame.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 5dc6387..83412a7 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -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