summaryrefslogtreecommitdiff
path: root/include/extern.h
diff options
context:
space:
mode:
authorgeniusdex 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
committergeniusdex 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
commita6e9356357a9dfe0c01871531eba58f6fdce92ea (patch)
treecd90b41ac8b20a86d00df4818853c21754067ebd /include/extern.h
parent843f9f38a8e2a567432223bc173710e52d7431c1 (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/extern.h')
-rw-r--r--include/extern.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/extern.h b/include/extern.h
index 433d6bb96..56e2ff4ca 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1055,6 +1055,20 @@ E int sockprintf(ano_socket_t s, char *fmt, ...);
E int conn(const char *host, int port, const char *lhost, int lport);
E void disconn(ano_socket_t s);
+/**** userban.c ****/
+
+E uint32 cidr_to_netmask(uint16 cidr);
+E uint16 netmask_to_cidr(uint32 mask);
+E BanInfo *ban_create(char *mask, uint32 id);
+E int ban_match(BanInfo *ban, char *user, char *host, uint32 ip);
+E int ban_match_mask(BanInfo *ban, char *mask, uint32 ip);
+E int ban_add(BanList *bl, char *mask);
+E void ban_del(BanList *bl, BanInfo *ban);
+E BanList *banlist_create(int hashed);
+E int banlist_match(BanList *bl, char *user, char *host, uint32 ip);
+E int banlist_match_mask(BanList *bl, char *mask, uint32 ip);
+E BanInfo *banlist_lookup_id(BanList *bl, uint32 id);
+
/**** users.c ****/
E User *userlist[1024];