Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / m_stats.c
index bd6e59082f2c5cce388e4cddf34966506ce8ee91..e4c9e939e4bcb49deab26cce57034cf6f2bb77df 100644 (file)
@@ -340,8 +340,15 @@ int m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
              (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 (acptr->passwd && IsDigit(*aconf->passwd) && 
+               (!aconf->passwd[1] || 
+                (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])
+             send_reply(sptr, RPL_STATSILINE, 'I', aconf->passwd, aconf->host, 
+                       aconf->name, aconf->port, get_conf_class(aconf));
+           }
+           else {
+             send_reply(sptr, RPL_STATSILINE, 'I', "*", aconf->host, 
+                       aconf->name, aconf->port, get_conf_class(aconf));
            if (--count == 0)
              break;
          }