diff options
| author | oy <Tom_Adams@web.de> | 2010-08-06 21:03:38 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-08-06 21:03:38 +0200 |
| commit | cac5554bdbb3fe010d591bb81d6c258dcfdbf7ac (patch) | |
| tree | b3c306bba31559120b7ba65cce6f77089e49efba /src/game/server | |
| parent | 3c082b6441dba3b4de1fd0fcc3e2ff838b5b8111 (diff) | |
| download | zcatch-cac5554bdbb3fe010d591bb81d6c258dcfdbf7ac.tar.gz zcatch-cac5554bdbb3fe010d591bb81d6c258dcfdbf7ac.zip | |
prevent that spectators start a vote
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 6 |
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."); |