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 | |
| 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')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 6 | ||||
| -rw-r--r-- | src/game/variables.h | 2 |
2 files changed, 8 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]) { diff --git a/src/game/variables.h b/src/game/variables.h index 775fd185..9750ce7f 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -104,4 +104,6 @@ MACRO_CONFIG_INT(SvAnticamper, sv_anticamper, 2, 0, 2, CFGFLAG_SERVER, "0 disabl MACRO_CONFIG_INT(SvAnticamperFreeze, sv_anticamper_freeze, 5, 0, 15, CFGFLAG_SERVER, "If a player should freeze on camping (and how long) or die") MACRO_CONFIG_INT(SvAnticamperTime, sv_anticamper_time, 10, 5, 120, CFGFLAG_SERVER, "How long to wait till the player dies/freezes") MACRO_CONFIG_INT(SvAnticamperRange, sv_anticamper_range, 200, 0, 1000, CFGFLAG_SERVER, "Distance how far away the player must move to escape anticamper") + +MACRO_CONFIG_INT(SvKickForceReason, sv_kick_force_reason, 1, 0, 1, CFGFLAG_SERVER, "Allow only kickvotes with a reason") #endif |