summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/client.h3
-rw-r--r--modules/m_accept.c4
-rw-r--r--src/client.c7
3 files changed, 7 insertions, 7 deletions
diff --git a/include/client.h b/include/client.h
index a5ba80c..66227aa 100644
--- a/include/client.h
+++ b/include/client.h
@@ -454,7 +454,8 @@ extern dlink_list oper_list; /* our opers, duplicated in local_client_l
extern int accept_message(struct Client *, struct Client *);
extern unsigned int idle_time_get(const struct Client *, const struct Client *);
extern struct split_nuh_item *find_accept(const char *, const char *,
- const char *, struct Client *, int);
+ const char *, struct Client *,
+ int (*)(const char *, const char *));
extern void del_accept(struct split_nuh_item *, struct Client *);
extern void del_all_accepts(struct Client *);
extern void exit_client(struct Client *, struct Client *, const char *);
diff --git a/modules/m_accept.c b/modules/m_accept.c
index 84cec49..7815083 100644
--- a/modules/m_accept.c
+++ b/modules/m_accept.c
@@ -151,7 +151,7 @@ m_accept(struct Client *client_p, struct Client *source_p,
split_nuh(&nuh);
- if ((accept_p = find_accept(nick, user, host, source_p, 0)) == NULL)
+ if ((accept_p = find_accept(nick, user, host, source_p, irccmp)) == NULL)
{
sendto_one(source_p, form_str(ERR_ACCEPTNOT),
me.name, source_p->name, nick, user, host);
@@ -181,7 +181,7 @@ m_accept(struct Client *client_p, struct Client *source_p,
split_nuh(&nuh);
- if ((accept_p = find_accept(nick, user, host, source_p, 0)) != NULL)
+ if ((accept_p = find_accept(nick, user, host, source_p, irccmp)) != NULL)
{
sendto_one(source_p, form_str(ERR_ACCEPTEXIST),
me.name, source_p->name, nick, user, host);
diff --git a/src/client.c b/src/client.c
index 2fc453d..25ee4c8 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1107,11 +1107,10 @@ del_accept(struct split_nuh_item *accept_p, struct Client *client_p)
struct split_nuh_item *
find_accept(const char *nick, const char *user,
- const char *host, struct Client *client_p, int do_match)
+ const char *host, struct Client *client_p,
+ int (*cmpfunc)(const char *, const char *))
{
dlink_node *ptr = NULL;
- /* XXX We wouldn't need that if match() would return 0 on match */
- int (*cmpfunc)(const char *, const char *) = do_match ? match : irccmp;
DLINK_FOREACH(ptr, client_p->localClient->acceptlist.head)
{
@@ -1140,7 +1139,7 @@ accept_message(struct Client *source,
dlink_node *ptr = NULL;
if (source == target || find_accept(source->name, source->username,
- source->host, target, 1))
+ source->host, target, match))
return 1;
if (HasUMode(target, UMODE_SOFTCALLERID))