diff options
Diffstat (limited to 'src/game/g_admin.h')
-rw-r--r-- | src/game/g_admin.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 126e33de..0137ec19 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -99,12 +99,24 @@ typedef struct g_admin_admin } g_admin_admin_t; +#define ADDRLEN 16 +typedef struct +{ + enum + { + IPv4, + IPv6 + } type; + byte addr[ ADDRLEN ]; + int mask; + char str[ 44 ]; +} addr_t; typedef struct g_admin_ban { struct g_admin_ban *next; char name[ MAX_NAME_LENGTH ]; char guid[ 33 ]; - char ip[ 44 ]; // big enough for IPv6 CIDR notation (without brackets) + addr_t ip; char reason[ MAX_ADMIN_BAN_REASON ]; char made[ 18 ]; // big enough for strftime() %c int expires; |