- fix a potential file descriptor leak in server side of pak downloading

- add new functions for banning clients from server, in engine part. This will also make it possible to ban ipv6 addresses in old mods.
This commit is contained in:
Thilo Schulz 2008-04-12 17:00:18 +00:00
parent 9a8cc99a93
commit f8d8a1c2f7
9 changed files with 477 additions and 3 deletions

View file

@ -213,6 +213,18 @@ typedef struct {
netadr_t authorizeAddress; // for rcon return messages
} serverStatic_t;
#define SERVER_MAXBANS 1024
#define SERVER_BANFILE "serverbans.dat"
// Structure for managing bans
typedef struct
{
netadr_t ip;
// For a CIDR-Notation type suffix
int subnet;
qboolean isexception;
} serverBan_t;
//=============================================================================
extern serverStatic_t svs; // persistant server info across maps
@ -249,6 +261,9 @@ extern cvar_t *sv_floodProtect;
extern cvar_t *sv_lanForceRate;
extern cvar_t *sv_strictAuth;
extern serverBan_t serverBans[SERVER_MAXBANS];
extern int serverBansCount;
//===========================================================
//