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
-rw-r--r--src/game/variables.h2
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