diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 11 | ||||
| -rw-r--r-- | src/game/variables.h | 2 |
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 |