From 76ed67fe37cba4734e1377a468cc95da736ff5d2 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 1 Nov 2013 20:44:22 +0000 Subject: - Got rid of find_kill() and find_gline() wrapper functions git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2523 82007160-df01-0410-b94d-b575c5fd34c7 --- include/conf.h | 2 -- src/client.c | 11 +++++++++-- src/conf.c | 33 --------------------------------- 3 files changed, 9 insertions(+), 37 deletions(-) diff --git a/include/conf.h b/include/conf.h index 16a6766..0397532 100644 --- a/include/conf.h +++ b/include/conf.h @@ -358,8 +358,6 @@ extern int check_client(struct Client *); extern void detach_conf(struct Client *, enum maskitem_type); extern struct MaskItem *find_conf_name(dlink_list *, const char *, enum maskitem_type); -extern struct MaskItem *find_kill(struct Client *); -extern struct MaskItem *find_gline(struct Client *); extern int conf_connect_allowed(struct irc_ssaddr *, int); extern char *oper_privs_as_string(const unsigned int); extern void split_nuh(struct split_nuh_item *); diff --git a/src/client.c b/src/client.c index 64028e9..575d411 100644 --- a/src/client.c +++ b/src/client.c @@ -361,8 +361,13 @@ check_conf_klines(void) continue; /* and go examine next fd/client_p */ } - if (ConfigFileEntry.glines && (conf = find_gline(client_p))) + if (ConfigFileEntry.glines) { + if (!(conf = find_conf_by_address(client_p->host, &client_p->localClient->ip, + CONF_GLINE, client_p->localClient->aftype, + client_p->username, NULL, 1))) + continue; + if (IsExemptKline(client_p) || IsExemptGline(client_p)) { @@ -377,7 +382,9 @@ check_conf_klines(void) continue; } - if ((conf = find_kill(client_p)) != NULL) + if ((conf = find_conf_by_address(client_p->host, &client_p->localClient->ip, + CONF_KLINE, client_p->localClient->aftype, + client_p->username, NULL, 1)) != NULL) { if (IsExemptKline(client_p)) { diff --git a/src/conf.c b/src/conf.c index 098ec52..5816847 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1283,39 +1283,6 @@ conf_connect_allowed(struct irc_ssaddr *addr, int aftype) return 0; } -/* find_kill() - * - * inputs - pointer to client structure - * output - pointer to struct MaskItem if found - * side effects - See if this user is klined already, - * and if so, return struct MaskItem pointer - */ -struct MaskItem * -find_kill(struct Client *client_p) -{ - struct MaskItem *conf = NULL; - - assert(client_p != NULL); - - conf = find_conf_by_address(client_p->host, &client_p->localClient->ip, - CONF_KLINE, client_p->localClient->aftype, - client_p->username, NULL, 1); - return conf; -} - -struct MaskItem * -find_gline(struct Client *client_p) -{ - struct MaskItem *conf; - - assert(client_p != NULL); - - conf = find_conf_by_address(client_p->host, &client_p->localClient->ip, - CONF_GLINE, client_p->localClient->aftype, - client_p->username, NULL, 1); - return conf; -} - /* cleanup_tklines() * * inputs - NONE -- cgit