diff options
| author | Teetime <TeetimeTW@yahoo.de> | 2011-11-18 17:56:34 +0100 |
|---|---|---|
| committer | Teetime <TeetimeTW@yahoo.de> | 2011-11-18 17:56:34 +0100 |
| commit | 61b8e0b9e1f53d410d03f960b30dbc3897b8ec51 (patch) | |
| tree | 4594162a45bdf465fcf34ef9cc8d5b8f12450beb /src/game/server/gamecontext.cpp | |
| parent | 95d76a114fee0a54fa1993b30cdee71b91448273 (diff) | |
| download | zcatch-61b8e0b9e1f53d410d03f960b30dbc3897b8ec51.tar.gz zcatch-61b8e0b9e1f53d410d03f960b30dbc3897b8ec51.zip | |
Added option to allow only kickvotes with a given reason
Diffstat (limited to 'src/game/server/gamecontext.cpp')
| -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 1900b314..6b7189c2 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -833,6 +833,12 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) } } + if(g_Config.m_SvKickForceReason && !pMsg->m_Reason[0]) + { + SendChatTarget(ClientID, "You must give a reason for your vote"); + return; + } + int KickID = str_toint(pMsg->m_Value); if(KickID < 0 || KickID >= MAX_CLIENTS || !m_apPlayers[KickID]) { |