summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-14 18:10:10 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-14 18:10:10 +0000
commitf6ce20726b517875f98a2238fe247635626cfd40 (patch)
treeb57a726aee93004681718abfba26a771f9a5ae77 /include
parentc45beadd12c70ddb0d43a99a3c1ac66c8f965533 (diff)
- Greatly speedup k-/g-line lookup. Instead of testing every single client against
every single k-/g-line just check the just added ban against connected clients. - Renamed ban_them() to conf_try_ban() - conf_try_ban() removed exemption notices that are now redundant - hostmask.c:parse_netmask(): optimize for the ipv4 case git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2815 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'include')
-rw-r--r--include/client.h3
-rw-r--r--include/hostmask.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/client.h b/include/client.h
index f8affb4..92fbddc 100644
--- a/include/client.h
+++ b/include/client.h
@@ -36,6 +36,8 @@
#include "channel.h"
#include "s_auth.h"
+struct MaskItem;
+
/*
* status macros.
*/
@@ -461,6 +463,7 @@ extern struct split_nuh_item *find_accept(const char *, const char *,
extern void del_accept(struct split_nuh_item *, struct Client *);
extern void del_all_accepts(struct Client *);
extern void exit_client(struct Client *, struct Client *, const char *);
+extern void conf_try_ban(struct Client *, struct MaskItem *);
extern void check_conf_klines(void);
extern void client_init(void);
extern void dead_link_on_write(struct Client *, int);
diff --git a/include/hostmask.h b/include/hostmask.h
index a8dc7c1..2275c27 100644
--- a/include/hostmask.h
+++ b/include/hostmask.h
@@ -72,7 +72,7 @@ extern int match_ipv4(const struct irc_ssaddr *, const struct irc_ssaddr *, int)
extern void mask_addr(struct irc_ssaddr *, int);
extern void init_host_hash(void);
-extern void add_conf_by_address(const unsigned int, struct MaskItem *);
+extern struct AddressRec *add_conf_by_address(const unsigned int, struct MaskItem *);
extern void delete_one_address_conf(const char *, struct MaskItem *);
extern void clear_out_address_conf(void);
extern void hostmask_expire_temporary(void);