From b41ab21700a77864b2342cde6d21628f8e7c19ac Mon Sep 17 00:00:00 2001 From: Alex Badea Date: Tue, 4 Jun 2002 18:09:07 +0000 Subject: [PATCH] Author: Alex Badea 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 | 5 +++++ ircd/m_stats.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee65b31..3072018 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-04 Alex Badea + + * 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 * ircd/m_server.c (mr_server): fixed core bug on insufficient diff --git a/ircd/m_stats.c b/ircd/m_stats.c index 6a2c64e..8bb8e67 100644 --- a/ircd/m_stats.c +++ b/ircd/m_stats.c @@ -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; } -- 2.20.1