diff options
| author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-06-05 10:46:25 +0000 |
|---|---|---|
| committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-06-05 10:46:25 +0000 |
| commit | a6e9356357a9dfe0c01871531eba58f6fdce92ea (patch) | |
| tree | cd90b41ac8b20a86d00df4818853c21754067ebd /include/services.h | |
| parent | 843f9f38a8e2a567432223bc173710e52d7431c1 (diff) | |
BUILD : 1.7.10 (828) BUGS : NOTES : Added a new ban system which should be faster than what we have now and also supports CIDR bans -- not yet in use, but will be used for akills andeventually channel bans -- hashing and cidr bans are not tested yet
git-svn-id: svn://svn.anope.org/anope/trunk@828 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@581 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/services.h')
| -rw-r--r-- | include/services.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/services.h b/include/services.h index e0017256e..31684577c 100644 --- a/include/services.h +++ b/include/services.h @@ -1317,6 +1317,44 @@ typedef struct ircd_modes_ { /*************************************************************************/ +/* UserBan support structures */ + +typedef struct baninfo_ BanInfo; +typedef struct banlist_ BanList; + +struct baninfo_ { + uint32 id; /* Ban ID, can be used to look it up */ + uint16 type; /* See BANTYPE_ below */ + + uint32 cidr_mask; /* Netmask for CIDR matching */ + uint32 cidr_ip; /* IP mask for CIDR matching */ + char *user; /* User value, NULL when not matched */ + char *host; /* Host value, NULL when not matched */ + + char *mask; /* String version of the ban mask, for displaying */ + + BanInfo *next; + BanInfo *prev; +}; + +struct banlist_ { + uint16 flags; /* See BANLIST_ below */ + BanInfo **bans; /* Ban data lists */ + uint32 next_id; /* Next ID to use for a ban */ +}; + +#define BANTYPE_NONE 0x0000 +#define BANTYPE_CIDR4 0x0001 +#define BANTYPE_USER 0x0002 +#define BANTYPE_USER_WILD 0x0004 +#define BANTYPE_HOST 0x0008 +#define BANTYPE_HOST_WILD 0x0010 + +#define BANLIST_NONE 0x0000 +#define BANLIST_HASHED 0x0001 + +/*************************************************************************/ + #include "extern.h" /*************************************************************************/ |
