Make srvx compile on cygwin again.
[srvx.git] / src / tools.c
index 445006a2fa3b7516b696bbee888e18bdb5f9ced5..d4dee86d65e221cd39357f1121752dce95e845ad 100644 (file)
@@ -313,7 +313,7 @@ irc_pton(irc_in_addr_t *addr, unsigned char *bits, const char *input)
                 addr->in6[cpos + jj] = 0;
         }
     } else if (dot) {
-        unsigned int ip4;
+        uint32_t ip4;
         pos = irc_pton_ip4(input, bits, &ip4);
         if (pos) {
             addr->in6[5] = htons(65535);
@@ -614,7 +614,8 @@ user_matches_glob(struct userNode *user, const char *orig_glob, int flags)
             return 1;
     }
     /* If only matching the visible hostnames, bail early. */
-    if ((flags & MATCH_VISIBLE) && (IsFakeHost(user) || IsHiddenHost(user)))
+    if ((flags & MATCH_VISIBLE) && IsHiddenHost(user)
+        && (IsFakeHost(user) || (hidden_host_suffix && user->handle_info)))
         return 0;
     /* If it might be an IP glob, test that. */
     if (!glob[strspn(glob, "0123456789./*?")]