summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/conf.h2
-rw-r--r--src/client.c11
-rw-r--r--src/conf.c33
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