Properly check for fake idents when checking for user matches.
[srvx.git] / src / tools.c
index a6bb07350926624813bea51db21a84ec6f78cf1d..7ba3738e27c85b37f9858d92581250428b90e5ab 100644 (file)
@@ -612,7 +612,8 @@ user_matches_glob(struct userNode *user, const char *orig_glob, int flags)
         return 0;
     }
     *marker = 0;
-    if (!match_ircglob(user->ident, glob))
+    if (((IsFakeIdent(user) && IsHiddenHost(user) && (flags & MATCH_VISIBLE)) || !match_ircglob(user->ident, glob)) &&
+        !(IsFakeIdent(user) && match_ircglob(user->fakeident, glob)))
         return 0;
     glob = marker + 1;
     /* Check for a fakehost match. */