diff --git a/engine/server/server.h b/engine/server/server.h index 66879c90..b6a04df0 100644 --- a/engine/server/server.h +++ b/engine/server/server.h @@ -80,8 +80,6 @@ extern int SV_UPDATE_BACKUP; #define FCL_SEND_RESOURCES BIT( 9 ) #define FCL_FORCE_UNMODIFIED BIT( 10 ) -#define MAX_CLIENT_IGNORECMDTIME_WARNS 10 // just a random number (for now) - typedef enum { ss_dead, // no map loaded diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 66570fa4..c5232dc5 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -59,7 +59,7 @@ CVAR_DEFINE_AUTO( sv_log_onefile, "0", FCVAR_ARCHIVE, "logs server information t CVAR_DEFINE_AUTO( sv_trace_messages, "0", FCVAR_LATCH, "enable server usermessages tracing (good for developers)" ); CVAR_DEFINE_AUTO( sv_master_response_timeout, "4", FCVAR_ARCHIVE, "master server heartbeat response timeout in seconds" ); CVAR_DEFINE_AUTO( sv_autosave, "1", FCVAR_ARCHIVE|FCVAR_SERVER|FCVAR_PRIVILEGED, "enable autosaving" ); -CVAR_DEFINE_AUTO( sv_speedhack_kick, "1", FCVAR_ARCHIVE, "enable automatic kicking players who use speedhacks" ); +CVAR_DEFINE_AUTO( sv_speedhack_kick, "10", FCVAR_ARCHIVE, "number of speedhack warns before automatic kick (0 to disable)" ); // game-related cvars CVAR_DEFINE_AUTO( mapcyclefile, "mapcycle.txt", 0, "name of multiplayer map cycle configuration file" ); diff --git a/engine/server/sv_pmove.c b/engine/server/sv_pmove.c index 59e9b66a..59d59413 100644 --- a/engine/server/sv_pmove.c +++ b/engine/server/sv_pmove.c @@ -919,7 +919,7 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed ) cl->ignorecmdtime_warns++; // automatically kick player - if( sv_speedhack_kick.value && cl->ignorecmdtime_warns > MAX_CLIENT_IGNORECMDTIME_WARNS ) + if( sv_speedhack_kick.value && cl->ignorecmdtime_warns > sv_speedhack_kick.value ) SV_KickPlayer( cl, "Speed hacks aren't allowed on this server" ); } cl->cmdtime += ((double)ucmd->msec / 1000.0 );