diff options
author | Andrey Nazarov <skuller@skuller.net> | 2010-09-07 20:36:12 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2010-09-07 20:36:12 +0000 |
commit | 043c6070217408799a50dbde0ee41f29d3017daf (patch) | |
tree | 2fa82e7917a00ab13a873021d119754638b71ddc /source/sv_local.h | |
parent | 73872fb2d18bf49605b1969ef304602547c247c8 (diff) |
Allow extended ‘<limit>[/<period>[sec|min|hour]]’ syntax for ‘sv_status_limit’ (default period is one second).
Split ‘sv_badauth_time’ cvar into ‘sv_auth_limit’ and ‘sv_rcon_limit’, with syntax identical to ‘sv_status_limit’.
Reset rate limiting counters at server shutdown to make sure rcon rate limiting continues to work.
Diffstat (limited to 'source/sv_local.h')
-rw-r--r-- | source/sv_local.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/sv_local.h b/source/sv_local.h index 04f127b..fb8b2bb 100644 --- a/source/sv_local.h +++ b/source/sv_local.h @@ -381,10 +381,10 @@ typedef struct server_static_s { unsigned last_heartbeat; ratelimit_t ratelimit_status; - ratelimit_t ratelimit_badpass; - ratelimit_t ratelimit_badrcon; + ratelimit_t ratelimit_auth; + ratelimit_t ratelimit_rcon; - challenge_t challenges[MAX_CHALLENGES]; // to prevent invalid IPs from connecting + challenge_t challenges[MAX_CHALLENGES]; // to prevent invalid IPs from connecting } server_static_t; //============================================================================= @@ -438,7 +438,8 @@ extern cvar_t *sv_enhanced_setplayer; extern cvar_t *sv_status_limit; extern cvar_t *sv_status_show; -extern cvar_t *sv_badauth_time; +extern cvar_t *sv_auth_limit; +extern cvar_t *sv_rcon_limit; extern cvar_t *sv_uptime; extern cvar_t *g_features; @@ -465,8 +466,8 @@ void SV_InitOperatorCommands (void); void SV_UserinfoChanged (client_t *cl); void SV_UpdateUserinfo( char *userinfo ); -qboolean SV_RateLimited( ratelimit_t *r ); -void SV_RateInit( ratelimit_t *r, int limit, int period ); +//qboolean SV_RateLimited( ratelimit_t *r ); +//void SV_RateInit( ratelimit_t *r, const char *s ); addrmatch_t *SV_MatchAddress( list_t *list, netadr_t *address ); |