Add reason field to serverBan structure with defined maximum length

This commit is contained in:
ysdragon 2025-03-12 07:30:22 +02:00
parent 158ff62aaa
commit 1e2a331518
No known key found for this signature in database
GPG key ID: AE6E8E17DA81BA0E

View file

@ -326,14 +326,15 @@ typedef struct {
} serverStatic_t; } serverStatic_t;
#define SERVER_MAXBANS 1024 #define SERVER_MAXBANS 1024
#define MAX_REASON_LENGTH 128
// Structure for managing bans // Structure for managing bans
typedef struct typedef struct serverBan_s {
{
netadr_t ip; netadr_t ip;
// For a CIDR-Notation type suffix // For a CIDR-Notation type suffix
int subnet; int subnet;
qboolean isexception; qboolean isexception;
char reason[MAX_REASON_LENGTH];
} serverBan_t; } serverBan_t;
//============================================================================= //=============================================================================