summaryrefslogtreecommitdiff
path: root/src/game/g_local.h
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-06 03:42:10 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:40 +0000
commit4c26128cbf19552bb3939e0b1b0a518a793e946f (patch)
tree0542e1cd5153b7e8bbfd00c3b3ea7620f7a78cd4 /src/game/g_local.h
parenta4478a4d40db8d11ce0ac54490565abeb65c3b5f (diff)
* (bug 4071) subnet bans
Allow banning and namelog searching by IP address in CIDR notation Banning a range of addresses will immediately kick all players in that range Admins with IMMUNITY flag can connect even if their IP address is banned admin.dat files relying on substring matching will have to be updated
Diffstat (limited to 'src/game/g_local.h')
-rw-r--r--src/game/g_local.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 46a75c62..59d76f12 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -773,6 +773,20 @@ qboolean G_InPowerZone( gentity_t *self );
//
// g_utils.c
//
+#define ADDRLEN 16
+typedef struct
+{
+ enum
+ {
+ IPv4,
+ IPv6
+ } type;
+ byte addr[ ADDRLEN ];
+} addr_t;
+qboolean G_AddressParse( const char *str, addr_t *addr, int *netmask );
+qboolean G_AddressCompare( const addr_t *a, const addr_t *b, int netmask );
+qboolean G_AdrCmpStr( const char *a, const char *b );
+
int G_ParticleSystemIndex( char *name );
int G_ShaderIndex( char *name );
int G_ModelIndex( char *name );