Separate notion of _FLOOD constant from the flags stored in the Flooding struct
This adds a FLOOD_FLAG() macro to convert a _FLOOD constant to the appropriate flag. For now this just casts the argument to unsigned int. Rename Flooding.type to Flooding.flags and change it to unsigned int, to reflect that it's a bitfield of flags for multiple flooding types.
This commit is contained in:
@@ -26,6 +26,8 @@ void clean_flood_list(void);
|
||||
#define KICK_FLOOD 0x0800
|
||||
#define JOIN_FLOOD 0x1000
|
||||
|
||||
#define FLOOD_FLAG(t) ((unsigned)(t))
|
||||
|
||||
#include "hash.h"
|
||||
#define FLOOD_HASHSIZE 31
|
||||
extern HashEntry no_flood_list[FLOOD_HASHSIZE];
|
||||
|
||||
@@ -1012,7 +1012,7 @@ typedef struct flood_stru
|
||||
char *name;
|
||||
char *host;
|
||||
char *channel;
|
||||
int type;
|
||||
unsigned flags;
|
||||
char flood;
|
||||
unsigned long cnt;
|
||||
struct timeval start;
|
||||
|
||||
Reference in New Issue
Block a user