From 4c26128cbf19552bb3939e0b1b0a518a793e946f Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Tue, 6 Oct 2009 03:42:10 +0000 Subject: * (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 --- src/game/g_admin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game/g_admin.h') diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 5ac3c668..7917b2b3 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -109,7 +109,7 @@ typedef struct g_admin_ban { char name[ MAX_NAME_LENGTH ]; char guid[ 33 ]; - char ip[ 40 ]; + char ip[ 44 ]; // big enough for IPv6 CIDR notation (without brackets) char reason[ MAX_ADMIN_BAN_REASON ]; char made[ 18 ]; // big enough for strftime() %c int expires; @@ -136,7 +136,7 @@ typedef struct g_admin_namelog } g_admin_namelog_t; -qboolean G_admin_ban_check( char *userinfo, char *reason, int rlen ); +qboolean G_admin_ban_check( gentity_t *ent, char *reason, int rlen ); qboolean G_admin_cmd_check( gentity_t *ent, qboolean say ); qboolean G_admin_readconfig( gentity_t *ent, int skiparg ); qboolean G_admin_permission( gentity_t *ent, const char *flag ); -- cgit