From ebb5967a19ee6abdd70a965ff8ca127df47f136f Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 13 Nov 2012 20:28:53 +0000 Subject: - changed match() polarity. match() now returns 0 on match and 1 on non-match This cleans up several places where function pointers of different matching functions like irccmp/strcmp/match are passed to other functions. - added improved collapse() to match.c git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1652 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/m_testmask.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/m_testmask.c') diff --git a/modules/m_testmask.c b/modules/m_testmask.c index 20da840..78d02d5 100644 --- a/modules/m_testmask.c +++ b/modules/m_testmask.c @@ -89,11 +89,11 @@ mo_testmask(struct Client *client_p, struct Client *source_p, { const struct Client *target_p = ptr->data; - if (!IsClient(target_p) || !match(given_nick, target_p->name)) + if (!IsClient(target_p) || match(given_nick, target_p->name)) continue; - if (match(given_user, target_p->username)) - if (match(given_host, target_p->host) || match(given_host, target_p->sockhost)) + if (!match(given_user, target_p->username)) + if (!match(given_host, target_p->host) || !match(given_host, target_p->sockhost)) ++count[!MyConnect(target_p)]; } -- cgit