summaryrefslogtreecommitdiff
path: root/modules/m_trace.c
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2012-11-13 20:28:53 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2012-11-13 20:28:53 +0000
commitebb5967a19ee6abdd70a965ff8ca127df47f136f (patch)
tree4b83ace97e2b2d855be8474612014d9af787215e /modules/m_trace.c
parente13f9deabc82ad42abb8adf1ab8d416a764aeafc (diff)
- 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
Diffstat (limited to 'modules/m_trace.c')
-rw-r--r--modules/m_trace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/m_trace.c b/modules/m_trace.c
index 6116a75..77982fa 100644
--- a/modules/m_trace.c
+++ b/modules/m_trace.c
@@ -120,7 +120,7 @@ mo_trace(struct Client *client_p, struct Client *source_p,
{
ac2ptr = ptr->data;
- if (match(tname, ac2ptr->name))
+ if (!match(tname, ac2ptr->name))
break;
else
ac2ptr = NULL;
@@ -190,7 +190,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
- if (match(tname, me.name))
+ if (!match(tname, me.name))
doall = 1;
else if (!MyClient(source_p) && !strcmp(tname, me.id))
{
@@ -244,7 +244,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
!(MyConnect(source_p) && HasUMode(source_p, UMODE_OPER)) &&
!HasUMode(target_p, UMODE_OPER) && (target_p != source_p))
continue;
- if (!doall && wilds && !match(tname, target_p->name))
+ if (!doall && wilds && match(tname, target_p->name))
continue;
if (!dow && irccmp(tname, target_p->name))
continue;
@@ -256,7 +256,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
{
target_p = ptr->data;
- if (!doall && wilds && !match(tname, target_p->name))
+ if (!doall && wilds && match(tname, target_p->name))
continue;
if (!dow && irccmp(tname, target_p->name))
continue;
@@ -269,7 +269,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
{
target_p = ptr->data;
- if (!doall && wilds && !match(tname, target_p->name))
+ if (!doall && wilds && match(tname, target_p->name))
continue;
if (!dow && irccmp(tname, target_p->name))
continue;