about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/server/gamecontext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index 0c3c1ef5..e9cce458 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -591,6 +591,12 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
 
 		int64 Now = Server()->Tick();
 		p->m_Last_VoteTry = Now;
+		if(p->GetTeam() == -1)
+		{
+			SendChatTarget(ClientId, "Spectators aren't allowed to start a vote.");
+			return;
+		}
+
 		if(m_VoteCloseTime)
 		{
 			SendChatTarget(ClientId, "Wait for current vote to end before calling a new one.");