Author: Ghostwolf <foxxe@wtfs.net>
authorJoseph Bongaarts <foxxe@wtfs.net>
Tue, 19 Mar 2002 19:25:55 +0000 (19:25 +0000)
committerJoseph Bongaarts <foxxe@wtfs.net>
Tue, 19 Mar 2002 19:25:55 +0000 (19:25 +0000)
Log message:
Fixed a bug in /stats i, and in the process saw someone tried to show connection
limits in /stats i. Took the idea and finished implementing it. Update ChangeLog
for today's earlier commits as well.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@680 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_stats.c
ircd/s_err.c
ircd/s_stats.c

index 5f9874cca244ad67a793a89d5218062f1b33eea6..ba18638bb398b373b8c3d11c028fcf3be6b9ee10 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2002-03-19 Joseph Bongaarts <foxxe@wtfs.net>
+
+       * include/ircd_policy.h: added NO_HEAD_IN_SAND for easier removal of
+       hiding features.
+
+       * configure.in: add --disable-headinsand
+
+       * configure: Ran autoconf
+
+       * ircd/m_stats.c: Fixed a bug in /stats i and made /stats i show 
+       connect limits
+
+       * ircd/s_stats.c: Made /stats i report connect limits
+
+       * ircd/s_err.c: Modified RPL_STATSILINE to use %s instead of 
+       "*" for the password field.
+       
 2002-03-19 LordLuke <lordluke@undernet.org>
 
        * include/channel.h: Allow opers to view +s channels in /list
index a6cda1563501caebed7a8b6629eb4ce28c4bbf7b..cad559a6fbd4046d7dc2c14cd1c1dfe113df6017 100644 (file)
@@ -340,15 +340,15 @@ int m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
              (wilds && (!mmatch(host, aconf->host) ||
              !mmatch(host, aconf->name))))
          {
-           if (acptr->passwd && IsDigit(*aconf->passwd) && 
+           if (aconf->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, 
+                (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])))
+             send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, aconf->passwd, 
                        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;
          }
@@ -657,8 +657,16 @@ int ms_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 (aconf->passwd && IsDigit(*aconf->passwd) &&
+               (!aconf->passwd[1] ||
+                (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])))
+             send_reply(sptr, RPL_STATSILINE, 'I', aconf->host,
+                        aconf->passwd, 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;
          }
@@ -877,8 +885,16 @@ int mo_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 (aconf->passwd && IsDigit(*aconf->passwd) &&
+                 (!aconf->passwd[1] ||
+                  (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])))
+               send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, 
+                          aconf->passwd, 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;
            }
index c9f629617a7904270cb3e3f2264773cf58308dad..08195f80268a7efd6b0cf139a1005e2a98fc6bca 100644 (file)
@@ -462,7 +462,7 @@ static Numeric replyTable[] = {
 /* 214 */
   { RPL_STATSNLINE, "%c %s * %s %d %d", "214" },
 /* 215 */
-  { RPL_STATSILINE, "%c %s * %s %d %d", "215" },
+  { RPL_STATSILINE, "%c %s %s %s %d %d", "215" },
 /* 216 */
   { RPL_STATSKLINE, "%c %s \"%s\" %s 0 0", "216" },
 /* 217 */
index e966e46648e456d6fb0d636281ecd6f7f3ba5b59..4b07c81dffe18d0dbf93d855560437c2be331254 100644 (file)
@@ -128,6 +128,14 @@ void report_configured_links(struct Client *sptr, int mask)
        send_reply(sptr, p[1], c, host, pass, name, port, get_conf_class(tmp));
       else if ((tmp->status & (CONF_SERVER | CONF_HUB)))
        send_reply(sptr, p[1], c, "*", name, port, get_conf_class(tmp));
+      else if ((tmp->status & CONF_CLIENT))
+      {
+       if(tmp->passwd && IsDigit(*tmp->passwd) && (!tmp->passwd[1] ||
+           (IsDigit(tmp->passwd[1]) && !tmp->passwd[2])))
+         send_reply(sptr, p[1], c, host, pass, name, port, get_conf_class(tmp));
+       else
+         send_reply(sptr, p[1], c, host, "*", name, port, get_conf_class(tmp));
+      }
       else
        send_reply(sptr, p[1], c, host, name, port, get_conf_class(tmp));
     }