Author: Alex Badea <vampire@p16.pub.ro>
authorAlex Badea <vampire@p16.pub.ro>
Tue, 4 Jun 2002 18:09:07 +0000 (18:09 +0000)
committerAlex Badea <vampire@p16.pub.ro>
Tue, 4 Jun 2002 18:09:07 +0000 (18:09 +0000)
Log message:

Fixed /stats v so it *cough* displays all servers on the network

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

ChangeLog
ircd/m_stats.c

index ee65b317b11b4b757e18529a16067af97937c9f8..3072018c9ea678abb0b2caef2dd2bea7acd6c65f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-04  Alex Badea  <vampire@p16.pub.ro>
+
+       * ircd/m_stats.c (report_servers_verbose): oops, fixed it so
+       it displays all servers, not just local connects
+
 2002-05-30  Jean-Edouard Babin  <Jeb@jeb.com.fr>
 
        * ircd/m_server.c (mr_server): fixed core bug on insufficient
index 6a2c64ec174b397bec42c394851655f5e1f23daf..8bb8e67e8a9cbf05749c5077a796cd069dac2d68 100644 (file)
@@ -172,24 +172,23 @@ int report_klines(struct Client* sptr, char* mask, int limit_query)
 static int report_servers_verbose(struct Client *sptr, char stat)
 {
   struct Client *acptr;
-  int i;
 
   /* lowercase 'v' is for human-readable,
    * uppercase 'V' is for machine-readable */
   if (stat == 'v')
     send_reply(sptr, SND_EXPLICIT | RPL_STATSVERBOSE,
-              "%-20s Burst Hops Numeric   Lag Clients/Max Proto "
-              "%-10s :Info", "Servername", "LinkTS");
-  for (i = -1; i <= HighestFd; i++) {
-    if (i == -1)
-      /* Hack 'me' in the list as well */
-      acptr = &me;
-    else if (!(acptr = LocalClientArray[i]) || !IsServer(acptr))
+              "%-20s %-20s Burst Hops Numeric   Lag Clients/Max Proto "
+              "%-10s :Info", "Servername", "Uplink", "LinkTS");
+
+  for (acptr = GlobalClientList; acptr; acptr = cli_next(acptr))
+  {
+    if (!IsServer(acptr) && !IsMe(acptr))
       continue;
     send_reply(sptr, SND_EXPLICIT | RPL_STATSVERBOSE, stat == 'v' ?
-              "%-20s %c%c    %4i %s %-4i %5i %5i %5i P%-2i   %Tu :%s" :
-              "%s %c%c %i %s %i %i %i %i P%i %Tu :%s",
+              "%-20s %-20s %c%c    %4i %s %-4i %5i %5i %5i P%-2i   %Tu :%s" :
+              "%s %s %c%c %i %s %i %i %i %i P%i %Tu :%s",
               cli_name(acptr),
+              cli_name(cli_serv(acptr)->up),
               IsBurst(acptr) ? 'B' : '-',
               IsBurstAck(acptr) ? 'A' : '-',
               cli_hopcount(acptr),
@@ -202,6 +201,7 @@ static int report_servers_verbose(struct Client *sptr, char stat)
               cli_serv(acptr)->timestamp,
               cli_info(acptr));
   }
+
   return 0;
 }