X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..640b57ec8424b367d052b08c4dc79d50df6b7210:/include/hostmask.h diff --git a/include/hostmask.h b/include/hostmask.h index ebd8bfc..fa219ad 100644 --- a/include/hostmask.h +++ b/include/hostmask.h @@ -31,7 +31,7 @@ enum { HM_HOST, HM_IPV4 -#ifdef IPV6 +#ifdef RB_IPV6 , HM_IPV6 #endif }; @@ -39,30 +39,28 @@ enum int parse_netmask(const char *, struct sockaddr *, int *); struct ConfItem *find_conf_by_address(const char *host, const char *sockhost, const char *orighost, struct sockaddr *, - int, int, const char *); -void add_conf_by_address(const char *, int, const char *, struct ConfItem *); + int, int, const char *, const char *); +struct ConfItem *find_exact_conf_by_address(const char *address, int type, + const char *username); +void add_conf_by_address(const char *, int, const char *, const char *, struct ConfItem *); void delete_one_address_conf(const char *, struct ConfItem *); void clear_out_address_conf(void); void clear_out_address_conf_bans(void); void init_host_hash(void); struct ConfItem *find_address_conf(const char *host, const char *sockhost, const char *, const char *, struct sockaddr *, - int); + int, char *); struct ConfItem *find_dline(struct sockaddr *, int); #define find_kline(x) (find_conf_by_address((x)->host, (x)->sockhost, \ (x)->orighost, \ (struct sockaddr *)&(x)->localClient->ip, CONF_KILL,\ - (x)->localClient->ip.ss_family, (x)->username)) -#define find_gline(x) (find_conf_by_address((x)->host, (x)->sockhost, \ - (x)->orighost, \ - (struct sockaddr *)&(x)->localClient->ip, CONF_GLINE,\ - (x)->localClient->ip.ss_family, (x)->username)) + (x)->localClient->ip.ss_family, (x)->username, NULL)) void report_Klines(struct Client *); void report_auth(struct Client *); -#ifdef IPV6 +#ifdef RB_IPV6 int match_ipv6(struct sockaddr *, struct sockaddr *, int); #endif int match_ipv4(struct sockaddr *, struct sockaddr *, int); @@ -83,7 +81,7 @@ struct AddressRec struct { /* Pointer into ConfItem... -A1kmm */ - struct irc_sockaddr_storage addr; + struct rb_sockaddr_storage addr; int bits; } ipa; @@ -101,6 +99,8 @@ struct AddressRec /* Only checked if !(type & 1)... */ const char *username; + /* Only checked if type == CONF_CLIENT */ + const char *auth_user; struct ConfItem *aconf; /* The next record in this hash bucket. */