From 26c553d0b0b4edb6088324d44c9b05c513d4253e Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 25 Apr 2013 15:00:52 +0000 Subject: - Added basic support for libGeoIP - Added exempt configuration option to resv{} blocks git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1858 82007160-df01-0410-b94d-b575c5fd34c7 --- include/client.h | 1 + include/conf.h | 16 +++++++++++++++- include/ircd.h | 3 +++ include/resv.h | 4 ++-- include/stdinc.h | 4 ++++ 5 files changed, 25 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/client.h b/include/client.h index ed8ddb4..782101f 100644 --- a/include/client.h +++ b/include/client.h @@ -356,6 +356,7 @@ struct LocalUser dlink_list invited; /**< chain of invite pointer blocks */ struct irc_ssaddr ip; int aftype; /**< Makes life easier for DNS res in IPV6 */ + int country_id; /**< ID corresponding to a ISO 3166 country code */ char *passwd; fde_t fd; diff --git a/include/conf.h b/include/conf.h index fd1a3cf..faacd27 100644 --- a/include/conf.h +++ b/include/conf.h @@ -155,6 +155,7 @@ struct MaskItem dlink_node node; dlink_list leaf_list; dlink_list hub_list; + dlink_list exempt_list; enum maskitem_type type; unsigned int dns_failed; unsigned int dns_pending; @@ -184,6 +185,20 @@ struct MaskItem void *regexhost; }; +struct exempt +{ + dlink_node node; + char *name; + char *user; + char *host; + size_t len; + time_t when; + struct irc_ssaddr addr; + int bits; + int type; + int coid; +}; + struct CidrItem { dlink_node node; @@ -258,7 +273,6 @@ struct config_file_entry struct config_channel_entry { int disable_fake_channels; - int restrict_channels; int knock_delay; int knock_delay_channel; unsigned int max_bans; diff --git a/include/ircd.h b/include/ircd.h index 5a1e4c4..7d8917b 100644 --- a/include/ircd.h +++ b/include/ircd.h @@ -88,6 +88,9 @@ struct ServerState_t }; +#ifdef HAVE_LIBGEOIP +extern GeoIP *geoip_ctx; +#endif extern char **myargv; extern const char *infotext[]; extern const char *serno; diff --git a/include/resv.h b/include/resv.h index 85dd3cf..02dbee7 100644 --- a/include/resv.h +++ b/include/resv.h @@ -28,11 +28,11 @@ extern dlink_list nresv_items; extern dlink_list resv_channel_list; -extern struct MaskItem *create_channel_resv(const char *, const char *); -extern struct MaskItem *create_nick_resv(const char *, const char *); +extern struct MaskItem *create_resv(const char *, const char *, const dlink_list *); extern void report_resv(struct Client *); extern int valid_wild_card_simple(const char *); +extern int resv_find_exempt(const struct Client *, const struct MaskItem *); extern struct MaskItem *match_find_resv(const char *); #endif /* INCLUDED_resv_h */ diff --git a/include/stdinc.h b/include/stdinc.h index 4596f8a..3acaab9 100644 --- a/include/stdinc.h +++ b/include/stdinc.h @@ -51,6 +51,10 @@ #include #endif +#ifdef HAVE_LIBGEOIP +#include +#endif + #include #include #include -- cgit