aboutsummaryrefslogtreecommitdiffstats
path: root/code/server/server.h
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-12 17:00:18 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-12 17:00:18 +0000
commit2f4b09a3fd677b7fb66723bd64358dd0798a2af5 (patch)
treedbbaa32ed2043db251064baacb700ffc973b7fa3 /code/server/server.h
parenta957b652bae5d1a5320eb01c349437bc7197b91a (diff)
downloadioquake3-aero-2f4b09a3fd677b7fb66723bd64358dd0798a2af5.tar.gz
ioquake3-aero-2f4b09a3fd677b7fb66723bd64358dd0798a2af5.zip
- 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. git-svn-id: svn://svn.icculus.org/quake3/trunk@1312 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server/server.h')
-rw-r--r--code/server/server.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/code/server/server.h b/code/server/server.h
index 6a7612b..3d03aee 100644
--- a/code/server/server.h
+++ b/code/server/server.h
@@ -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;
+
//===========================================================
//