about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTeetime <TeetimeTW@yahoo.de>2011-11-23 14:36:46 +0100
committerTeetime <TeetimeTW@yahoo.de>2011-11-23 14:36:46 +0100
commit0d55f8847c792b9e0b67044f6cebf1d52ae69be1 (patch)
tree0c1c0d4bd1ec52d9a2b3fbdf86b00689b3ed1e44 /src
parentb76002a178b80463abf59fdd2de59f7cce354575 (diff)
downloadzcatch-0d55f8847c792b9e0b67044f6cebf1d52ae69be1.tar.gz
zcatch-0d55f8847c792b9e0b67044f6cebf1d52ae69be1.zip
changed force of vote-reason
Diffstat (limited to 'src')
-rw-r--r--src/game/server/gamecontext.cpp11
-rw-r--r--src/game/variables.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index b345ec8c..3f40bfcd 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -811,6 +811,11 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
 				return;
 			}
 		}
+		else if(g_Config.m_SvVoteForceReason && !pMsg->m_Reason[0])
+		{
+			SendChatTarget(ClientID, "You must give a reason for your vote");
+			return;
+		}
 		else if(str_comp_nocase(pMsg->m_Type, "kick") == 0)
 		{
 			if(!g_Config.m_SvVoteKick)
@@ -834,12 +839,6 @@ 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 7b14264a..0277c9ad 100644
--- a/src/game/variables.h
+++ b/src/game/variables.h
@@ -105,7 +105,7 @@ MACRO_CONFIG_INT(SvAnticamperFreeze, sv_anticamper_freeze, 7, 0, 15, CFGFLAG_SER
 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")
+MACRO_CONFIG_INT(SvVoteForceReason, sv_vote_forcereason, 1, 0, 1, CFGFLAG_SERVER, "Allow only votes with a reason (except settings)")
 MACRO_CONFIG_INT(SvGrenadeMinDamage, sv_grenade_min_damage, 4, 1, 6, CFGFLAG_SERVER, "How much damage the grenade must do to kill the player (depends how far away it explodes)")
 MACRO_CONFIG_INT(SvSuicideTime, sv_suicide_time, 15, 0, 60, CFGFLAG_SERVER, "Minimum time between suicides. 0 to forbid suicides completely")
 #endif