- if ((!wilds && ((user || conf->hostmask) &&
- !match(conf->hostmask, host) &&
- (!user || !match(conf->usermask, user)))) ||
- (wilds && !mmatch(host, conf->hostmask) &&
- (!user || !mmatch(user, conf->usermask))))
- {
- send_reply(sptr, RPL_STATSKLINE,
- (conf->flags & DENY_FLAGS_IP) ? 'k' : 'K',
- conf->hostmask, conf->message, conf->usermask);
- if (--count == 0)
- return;
- }
+ /* Skip this block if the user is searching for a user-matching
+ * mask but the current Kill doesn't have a usermask, or if user
+ * is searching for a host-matching mask but the Kill has no
+ * hostmask, or if the user mask is specified and doesn't match,
+ * or if the host mask is specified and doesn't match.
+ */
+ if ((user && !conf->usermask)
+ || (host && !conf->hostmask)
+ || (user && conf->usermask
+ && (wilds
+ ? mmatch(user, conf->usermask)
+ : match(conf->usermask, user)))
+ || (host && conf->hostmask
+ && (wilds
+ ? mmatch(host, conf->hostmask)
+ : match(conf->hostmask, host))))
+ continue;
+ send_reply(sptr, RPL_STATSKLINE, conf->bits > 0 ? 'k' : 'K',
+ conf->usermask ? conf->usermask : "*",
+ conf->hostmask ? conf->hostmask : "*",
+ conf->message ? conf->message : "(none)",
+ conf->realmask ? conf->realmask : "*");
+ if (--count == 0)
+ return;