X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/5f4f1d055f0a2a9baeeade62b6ebfd5d939d5f1e..bcd8cc02e12c429c670408c24ddbbaf1186c76d1:/src/s_conf.c?ds=sidebyside diff --git a/src/s_conf.c b/src/s_conf.c index a8ec861..f27c6ab 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -35,7 +35,7 @@ #include "client.h" #include "common.h" #include "hash.h" -#include "irc_string.h" +#include "match.h" #include "ircd.h" #include "listener.h" #include "hostmask.h" @@ -50,7 +50,7 @@ struct config_server_hide ConfigServerHide; -extern int yyparse(); /* defined in y.tab.c */ +extern int yyparse(void); /* defined in y.tab.c */ extern char linebuf[]; #ifndef INADDR_NONE @@ -308,7 +308,8 @@ verify_access(struct Client *client_p, const char *username) aconf = find_address_conf(client_p->host, client_p->sockhost, client_p->username, client_p->username, (struct sockaddr *) &client_p->localClient->ip, - client_p->localClient->ip.ss_family); + client_p->localClient->ip.ss_family, + client_p->localClient->auth_user); } else { @@ -317,7 +318,8 @@ verify_access(struct Client *client_p, const char *username) aconf = find_address_conf(client_p->host, client_p->sockhost, non_ident, client_p->username, (struct sockaddr *) &client_p->localClient->ip, - client_p->localClient->ip.ss_family); + client_p->localClient->ip.ss_family, + client_p->localClient->auth_user); } if(aconf == NULL) @@ -898,35 +900,6 @@ validate_conf(void) } } -/* - * lookup_confhost - start DNS lookups of all hostnames in the conf - * line and convert an IP addresses in a.b.c.d number for to IP#s. - * - */ - -/* - * conf_connect_allowed - * - * inputs - pointer to inaddr - * - int type ipv4 or ipv6 - * output - ban info or NULL - * side effects - none - */ -struct ConfItem * -conf_connect_allowed(struct sockaddr *addr, int aftype) -{ - struct ConfItem *aconf = find_dline(addr, aftype); - - /* DLINE exempt also gets you out of static limits/pacing... */ - if(aconf && (aconf->status & CONF_EXEMPTDLINE)) - return NULL; - - if(aconf != NULL) - return aconf; - - return NULL; -} - /* add_temp_kline() * * inputs - pointer to struct ConfItem @@ -959,7 +932,7 @@ add_temp_kline(struct ConfItem *aconf) } aconf->flags |= CONF_FLAGS_TEMPORARY; - add_conf_by_address(aconf->host, CONF_KILL, aconf->user, aconf); + add_conf_by_address(aconf->host, CONF_KILL, aconf->user, NULL, aconf); } /* add_temp_dline() @@ -993,7 +966,7 @@ add_temp_dline(struct ConfItem *aconf) } aconf->flags |= CONF_FLAGS_TEMPORARY; - add_conf_by_address(aconf->host, CONF_DLINE, aconf->user, aconf); + add_conf_by_address(aconf->host, CONF_DLINE, aconf->user, NULL, aconf); } /* expire_tkline() @@ -1503,7 +1476,7 @@ conf_add_d_conf(struct ConfItem *aconf) } else { - add_conf_by_address(aconf->host, CONF_DLINE, NULL, aconf); + add_conf_by_address(aconf->host, CONF_DLINE, NULL, NULL, aconf); } } @@ -1538,7 +1511,7 @@ yyerror(const char *msg) { char newlinebuf[BUFSIZE]; - strip_tabs(newlinebuf, (const unsigned char *) linebuf, strlen(linebuf)); + strip_tabs(newlinebuf, linebuf, strlen(linebuf)); sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s at '%s'", conffilebuf, lineno + 1, msg, newlinebuf);