From cac5554bdbb3fe010d591bb81d6c258dcfdbf7ac Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 6 Aug 2010 21:03:38 +0200 Subject: prevent that spectators start a vote --- src/game/server/gamecontext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game/server/gamecontext.cpp') 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."); -- cgit 1.4.1