diff --git a/src/modules/stats.c b/src/modules/stats.c index c35a02985..75f526752 100644 --- a/src/modules/stats.c +++ b/src/modules/stats.c @@ -1267,7 +1267,7 @@ int stats_linkinfoint(aClient *sptr, char *para, int all) { if (!mycmp(para, me.name)) doall = 2; - else if (!match_simple(para, me.name) == 0) + else if (match_simple(para, me.name)) doall = 1; if (index(para, '*') || index(para, '?')) wilds = 1; diff --git a/src/modules/tkl.c b/src/modules/tkl.c index fd04d11d9..29b1b0dad 100644 --- a/src/modules/tkl.c +++ b/src/modules/tkl.c @@ -3585,14 +3585,14 @@ int _match_user(char *rmask, aClient *acptr, int options) if (options & MATCH_CHECK_VISIBLE_HOST) { char *hostname = acptr->user ? GetHost(acptr) : (MyClient(acptr) ? acptr->local->sockhost : NULL); - if (hostname && (!match_simple(hmask, hostname) == 0)) + if (hostname && match_simple(hmask, hostname)) return 1; /* MATCH: visible host */ } /**** Check cloaked host ****/ if (options & MATCH_CHECK_CLOAKED_HOST) { - if (acptr->user && (!match_simple(hmask, acptr->user->cloakedhost) == 0)) + if (acptr->user && match_simple(hmask, acptr->user->cloakedhost)) return 1; /* MATCH: cloaked host */ } @@ -3611,7 +3611,7 @@ int _match_user(char *rmask, aClient *acptr, int options) if (strchr(hmask, '?') || strchr(hmask, '*')) { /* Wildcards */ - if (acptr->ip && (!match_simple(hmask, acptr->ip) == 0)) + if (acptr->ip && match_simple(hmask, acptr->ip)) return 1; /* MATCH (IP with wildcards) */ } else if (strchr(hmask, ':')) @@ -3663,7 +3663,7 @@ int _match_user(char *rmask, aClient *acptr, int options) if (options & MATCH_CHECK_REAL_HOST) { char *hostname = acptr->user ? acptr->user->realhost : (MyClient(acptr) ? acptr->local->sockhost : NULL); - if (hostname && (!match_simple(hmask, hostname) == 0)) + if (hostname && match_simple(hmask, hostname)) return 1; /* MATCH: hostname match */ } diff --git a/src/send.c b/src/send.c index cca7c3f56..63c1bef32 100644 --- a/src/send.c +++ b/src/send.c @@ -566,18 +566,15 @@ void sendto_local_common_channels(aClient *user, aClient *skip, long clicap, Mes ** addition -- Armin, 8jun90 (gruner@informatik.tu-muenchen.de) */ -static int match_it(one, mask, what) - aClient *one; - char *mask; - int what; +static int match_it(aClient *one, char *mask, int what) { switch (what) { - case MATCH_HOST: - return (!match_simple(mask, one->user->realhost) == 0); - case MATCH_SERVER: - default: - return (!match_simple(mask, one->user->server) == 0); + case MATCH_HOST: + return match_simple(mask, one->user->realhost); + case MATCH_SERVER: + default: + return match_simple(mask, one->user->server); } }