Fix race condition for day timing out immediately when a vote succeeds

This commit is contained in:
skizzerz 2015-08-26 20:09:57 -05:00
parent bb5cb78c68
commit 3dc3e4d172

View File

@ -1952,6 +1952,9 @@ def fday(cli, nick, chan, rest):
# Specify force = "nick" to force nick to be lynched # Specify force = "nick" to force nick to be lynched
def chk_decision(cli, force = ""): def chk_decision(cli, force = ""):
with var.GRAVEYARD_LOCK:
if var.PHASE != "day":
return
chan = botconfig.CHANNEL chan = botconfig.CHANNEL
pl = var.list_players() pl = var.list_players()
avail = len(pl) - len(var.WOUNDED) - len(var.ASLEEP) avail = len(pl) - len(var.WOUNDED) - len(var.ASLEEP)