1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-03 20:23:12 +02:00

Fix for previous commit (0d2d4d5bca)

This commit is contained in:
Bram Matthys
2019-08-17 09:31:58 +02:00
parent 0d2d4d5bca
commit f10ec9aebc
3 changed files with 11 additions and 14 deletions
+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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 */
}
+6 -9
View File
@@ -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);
}
}