- 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:
parent
9a8cc99a93
commit
f8d8a1c2f7
9 changed files with 477 additions and 3 deletions
|
@ -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;
|
||||
|
||||
//===========================================================
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue