- if (conf_status == CONF_CLIENT)
- {
- user = 0; /* Not used, but to avoid compiler warning. */
-
- host = parv[3];
- }
- else
- {
- if ((host = strchr(parv[3], '@')))
- {
- user = parv[3];
- *host++ = 0;;
- }
- else
- {
- user = 0;
- host = parv[3];
- }
- }
- for (aconf = GlobalConfList; aconf; aconf = aconf->next)
- {
- if ((aconf->status & conf_status))
- {
- if (conf_status == CONF_KLINE)
- {
- if ((!wilds && ((user || aconf->host[1]) &&
- !match(aconf->host, host) &&
- (!user || !match(aconf->name, user)))) ||
- (wilds && !mmatch(host, aconf->host) &&
- (!user || !mmatch(user, aconf->name))))
- {
- send_reply(sptr, RPL_STATSKLINE,
- (aconf->status & CONF_KILL) ? 'K' : 'k', aconf->host,
- aconf->passwd, aconf->name, aconf->port,
- get_conf_class(aconf));
- if (--count == 0)
- break;
- }
- }
- else if (conf_status == CONF_CLIENT)
- {
- if ((!wilds && (!match(aconf->host, host) ||
- !match(aconf->name, host))) ||
- (wilds && (!mmatch(host, aconf->host) ||
- !mmatch(host, aconf->name))))
- {
- send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, aconf->name,
- aconf->port, get_conf_class(aconf));
- if (--count == 0)
- break;
- }
- }
- }
+ for (aconf = GlobalConfList; aconf; aconf = aconf->next) {
+ if (CONF_CLIENT == aconf->status) {
+ if ((!wilds && (!match(aconf->host, host) ||
+ !match(aconf->name, host))) ||
+ (wilds && (!mmatch(host, aconf->host) ||
+ !mmatch(host, aconf->name))))
+ {
+ send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, aconf->name,
+ aconf->port, get_conf_class(aconf));
+ if (--count == 0)
+ break;
+ }
+ }
+ }