From 4b2a34e1c5885c332f6e8299f9822aef8ae8f766 Mon Sep 17 00:00:00 2001 From: SushiTee Date: Thu, 26 Jan 2012 22:17:26 +0100 Subject: [PATCH] force vote only if there is a vote --- src/game/server/gamecontext.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 87b9b3b71..96f981a68 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1385,6 +1385,11 @@ void CGameContext::ConClearVotes(IConsole::IResult *pResult, void *pUserData) void CGameContext::ConVote(IConsole::IResult *pResult, void *pUserData) { CGameContext *pSelf = (CGameContext *)pUserData; + + // check if there is a vote running + if(!pSelf->m_VoteCloseTime) + return; + if(str_comp_nocase(pResult->GetString(0), "yes") == 0) pSelf->m_VoteEnforce = CGameContext::VOTE_ENFORCE_YES; else if(str_comp_nocase(pResult->GetString(0), "no") == 0)