2 * IRC - Internet Relay Chat, ircd/m_stats.c
3 * Copyright (C) 1990 Jarkko Oikarinen and
4 * University of Oulu, Computing Center
6 * See file AUTHORS in IRC package for additional names of
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 1, or (at your option)
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 * m_functions execute protocol messages on this server:
29 * cptr is always NON-NULL, pointing to a *LOCAL* client
30 * structure (with an open socket connected!). This
31 * identifies the physical socket where the message
32 * originated (or which caused the m_function to be
33 * executed--some m_functions may call others...).
35 * sptr is the source of the message, defined by the
36 * prefix part of the message if present. If not
37 * or prefix not found, then sptr==cptr.
39 * (!IsServer(cptr)) => (cptr == sptr), because
40 * prefixes are taken *only* from servers...
43 * (sptr == cptr) => the message didn't
46 * (sptr != cptr && IsServer(sptr) means
47 * the prefix specified servername. (?)
49 * (sptr != cptr && !IsServer(sptr) means
50 * that message originated from a remote
55 * (!IsServer(sptr)) means that, sptr can safely
56 * taken as defining the target structure of the
57 * message in this server.
59 * *Always* true (if 'parse' and others are working correct):
61 * 1) sptr->from == cptr (note: cptr->from == cptr)
63 * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
64 * *cannot* be a local connection, unless it's
65 * actually cptr!). [MyConnect(x) should probably
66 * be defined as (x == x->from) --msa ]
68 * parc number of variable parameter strings (if zero,
69 * parv is allowed to be NULL)
71 * parv a NULL terminated list of parameter pointers,
73 * parv[0], sender (prefix string), if not present
74 * this points to an empty string.
75 * parv[1]...parv[parc-1]
76 * pointers to additional parameters
77 * parv[parc] == NULL, *always*
79 * note: it is guaranteed that parv[0]..parv[parc-1] are all
95 #include "ircd_alloc.h"
96 #include "ircd_chattr.h"
97 #include "ircd_events.h"
98 #include "ircd_features.h"
99 #include "ircd_policy.h"
100 #include "ircd_reply.h"
101 #include "ircd_string.h"
103 #include "listener.h"
108 #include "numnicks.h"
109 #include "opercmds.h"
118 #include "userload.h"
125 int report_klines(struct Client* sptr, char* mask, int limit_query)
131 const struct DenyConf* conf;
133 if (EmptyString(mask)) {
135 return need_more_params(sptr, "STATS K");
137 report_deny_list(sptr);
142 wilds = string_has_wildcards(mask);
146 if ((host = strchr(mask, '@'))) {
154 for (conf = conf_get_deny_list(); conf; conf = conf->next) {
155 if ((!wilds && ((user || conf->hostmask) &&
156 !match(conf->hostmask, host) &&
157 (!user || !match(conf->usermask, user)))) ||
158 (wilds && !mmatch(host, conf->hostmask) &&
159 (!user || !mmatch(user, conf->usermask))))
161 send_reply(sptr, RPL_STATSKLINE,
162 (conf->flags & DENY_FLAGS_IP) ? 'k' : 'K',
163 conf->hostmask, conf->message, conf->usermask);
168 /* send_reply(sptr, RPL_ENDOFSTATS, stat); */
172 static int report_servers_verbose(struct Client *sptr, char stat)
174 struct Client *acptr;
177 /* lowercase 'v' is for human-readable,
178 * uppercase 'V' is for machine-readable */
180 send_reply(sptr, SND_EXPLICIT | RPL_STATSVERBOSE,
181 "%-20s Burst Hops Numeric Lag Clients/Max Proto "
182 "%-10s :Info", "Servername", "LinkTS");
183 for (i = 0; i <= HighestFd; i++) {
184 if (!(acptr = LocalClientArray[i]) || !IsServer(acptr))
186 send_reply(sptr, SND_EXPLICIT | RPL_STATSVERBOSE, stat == 'v' ?
187 "%-20s %c%c %4i %s %-4i %5i %5i %5i P%-2i %Tu :%s" :
188 "%s %c%c %i %s %i %i %i %i P%i %Tu :%s",
190 IsBurst(acptr) ? 'B' : '-',
191 IsBurstAck(acptr) ? 'A' : '-',
194 base64toint(cli_yxx(acptr)),
195 cli_serv(acptr)->lag,
196 cli_serv(acptr)->clients,
197 cli_serv(acptr)->nn_mask,
198 cli_serv(acptr)->prot,
199 cli_serv(acptr)->timestamp,
207 * m_stats - generic message handler
209 * parv[0] = sender prefix
210 * parv[1] = statistics selector (defaults to Message frequency)
211 * parv[2] = target server (current server defaulted, if omitted)
212 * And 'stats l' and 'stats' L:
213 * parv[3] = server mask ("*" defaulted, if omitted)
215 * parv[3] = port mask (returns p-lines when its port is matched by this)
216 * Or for stats k,K,i and I:
217 * parv[3] = [user@]host.name (returns which K/I-lines match this)
218 * or [user@]host.mask (returns which K/I-lines are mmatched by this)
219 * (defaults to old reply if ommitted, when local or Oper)
220 * A remote mask (something containing wildcards) is only
221 * allowed for IRC Operators.
223 * parv[3] = time param
224 * parv[4] = time param
225 * (see report_memleak_stats() in runmalloc.c for details)
227 * This function is getting really ugly. -Ghostwolf
229 int m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
231 char stat = parc > 1 ? parv[1][0] : '\0';
232 const char **infotext = statsinfo;
234 if (hunt_stats(cptr, sptr, parc, parv, stat, HEAD_IN_SAND_REMOTE)
242 #ifdef HEAD_IN_SAND_STATS_L
243 return m_not_oper(sptr,cptr,parc,parv);
246 struct Client *acptr;
252 if (parc > 3 && !EmptyString(parv[3])) {
254 wilds = string_has_wildcards(name);
259 * Send info about connections which match, or all if the
260 * mask matches me.name. Only restrictions are on those who
261 * are invisible not being visible to 'foreigners' who use
262 * a wild card based search to list it.
264 send_reply(sptr, SND_EXPLICIT | RPL_STATSLINKINFO, "Connection SendQ "
265 "SendM SendKBytes RcveM RcveKBytes :Open since");
266 for (i = 0; i <= HighestFd; i++)
268 if (!(acptr = LocalClientArray[i]))
270 /* Don't return clients when this is a request for `all' */
271 if (doall && IsUser(acptr))
273 /* Don't show invisible people to non opers unless they know the nick */
274 if (IsInvisible(acptr) && (doall || wilds) && !IsAnOper(acptr) && (acptr != sptr))
276 /* Only show the ones that match the given mask - if any */
277 if (!doall && wilds && match(name, cli_name(acptr)))
279 /* Skip all that do not match the specific query */
280 if (!(doall || wilds) && 0 != ircd_strcmp(name, cli_name(acptr)))
282 send_reply(sptr, SND_EXPLICIT | RPL_STATSLINKINFO,
283 "%s %u %u %u %u %u :%Tu", (*(cli_name(acptr))) ? cli_name(acptr) : "<unregistered>",
284 (int)MsgQLength(&(cli_sendQ(acptr))), (int)cli_sendM(acptr),
285 (int)cli_sendK(acptr), (int)cli_receiveM(acptr),
286 (int)cli_receiveK(acptr), CurrentTime - cli_firsttime(acptr));
294 #ifdef HEAD_IN_SAND_STATS_C
295 return m_not_oper(sptr,cptr,parc,parv);
297 report_configured_links(sptr, CONF_SERVER);
302 case 'e': /* report engine name */
303 #ifdef HEAD_IN_SAND_STATS_E
304 return m_not_oper(sptr,cptr,parc,parv);
306 send_reply(sptr, RPL_STATSENGINE, engine_name());
311 case 'g': /* send glines */
312 #ifdef HEAD_IN_SAND_STATS_G
313 return m_not_oper(sptr,cptr,parc,parv);
321 #ifdef HEAD_IN_SAND_STATS_H
322 return m_not_oper(sptr,cptr,parc,parv);
324 report_configured_links(sptr, CONF_HUB | CONF_LEAF);
329 case 'k': /* display CONF_IPKILL as well as CONF_KILL -Kev */
330 #ifdef HEAD_IN_SAND_STATS_K
331 /* Simple version - if you want to fix it - send in a patch */
332 return m_not_oper(sptr,cptr,parc,parv);
334 if (0 == report_klines(sptr, (parc == 4) ? parv[3] : 0, 0))
340 #ifdef HEAD_IN_SAND_STATS_F
341 return m_not_oper(sptr,cptr,parc,parv);
343 feature_report(sptr);
349 #ifdef HEAD_IN_SAND_STATS_I
350 /* Simple version - if you want to fix it - send in a patch */
351 return m_not_oper(sptr,cptr,parc,parv);
354 struct ConfItem *aconf;
360 report_configured_links(sptr, CONF_CLIENT);
363 if (EmptyString(parv[3]))
364 return need_more_params(sptr, "STATS I");
367 wilds = string_has_wildcards(host);
369 for (aconf = GlobalConfList; aconf; aconf = aconf->next) {
370 if (CONF_CLIENT == aconf->status) {
371 if ((!wilds && (!match(aconf->host, host) ||
372 !match(aconf->name, host))) ||
373 (wilds && (!mmatch(host, aconf->host) ||
374 !mmatch(host, aconf->name))))
376 if (aconf->passwd && IsDigit(*aconf->passwd) &&
377 (!aconf->passwd[1] ||
378 (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])))
379 send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, aconf->passwd,
380 aconf->name, aconf->port, get_conf_class(aconf));
382 send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, "*",
383 aconf->name, aconf->port, get_conf_class(aconf));
395 #ifdef HEAD_IN_SAND_STATS_M
396 return m_not_oper(sptr,cptr,parc,parv);
399 send_reply(sptr, RPL_STATMEMTOT, fda_get_byte_count(),
400 fda_get_block_count());
406 #ifdef HEAD_IN_SAND_STATS_m
407 return m_not_oper(sptr,cptr,parc,parv);
410 struct Message *mptr;
412 for (mptr = msgtab; mptr->cmd; mptr++)
414 send_reply(sptr, RPL_STATSCOMMANDS, mptr->cmd, mptr->count,
422 #ifdef HEAD_IN_SAND_STATS_O
423 return m_not_oper(sptr,cptr,parc,parv);
425 report_configured_links(sptr, CONF_OPS);
432 * show listener ports
433 * show hidden ports to opers, if there are more than 3 parameters,
434 * interpret the fourth parameter as the port number.
436 #ifdef HEAD_IN_SAND_STATS_P
437 return m_not_oper(sptr,cptr,parc,parv);
439 show_ports(sptr, 0, (parc > 3) ? atoi(parv[3]) : 0, 100);
445 #ifdef HEAD_IN_SAND_STATS_R
446 return m_not_oper(sptr,cptr,parc,parv);
449 send_usage(sptr, parv[0]);
455 #ifdef HEAD_IN_SAND_STATS_D
456 return m_not_oper(sptr,cptr,parc,parv);
458 report_crule_list(sptr, CRULE_ALL);
463 #ifdef HEAD_IN_SAND_STATS_d
464 return m_not_oper(sptr,cptr,parc,parv);
466 report_crule_list(sptr, CRULE_MASK);
471 #ifdef HEAD_IN_SAND_STATS_t
472 return m_not_oper(sptr,cptr,parc,parv);
474 tstats(sptr, parv[0]);
479 #ifdef HEAD_IN_SAND_STATS_T
480 return m_not_oper(sptr,cptr,parc,parv);
487 #ifdef HEAD_IN_SAND_STATS_U
488 return m_not_oper(sptr,cptr,parc,parv);
490 report_configured_links(sptr, CONF_UWORLD);
495 #ifdef HEAD_IN_SAND_STATS_u
496 return m_not_oper(sptr,cptr,parc,parv);
501 nowr = CurrentTime - cli_since(&me);
502 send_reply(sptr, RPL_STATSUPTIME, nowr / 86400, (nowr / 3600) % 24,
503 (nowr / 60) % 60, nowr % 60);
504 send_reply(sptr, RPL_STATSCONN, max_connection_count, max_client_count);
511 #ifdef HEAD_IN_SAND_STATS_W
512 return m_not_oper(sptr,cptr,parc,parv);
520 #ifdef HEAD_IN_SAND_STATS_X
521 return m_not_oper(sptr,cptr,parc,parv);
524 class_send_meminfo(sptr);
525 send_listinfo(sptr, parv[0]);
532 #ifdef HEAD_IN_SAND_STATS_Y
533 return m_not_oper(sptr,cptr,parc,parv);
535 report_classes(sptr);
541 #ifdef HEAD_IN_SAND_STATS_Z
542 return m_not_oper(sptr,cptr,parc,parv);
544 count_memory(sptr, parv[0]);
551 sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr, *infotext++);
554 send_reply(sptr, RPL_ENDOFSTATS, stat);
559 * ms_stats - server message handler
561 * parv[0] = sender prefix
562 * parv[1] = statistics selector (defaults to Message frequency)
563 * parv[2] = target server (current server defaulted, if omitted)
564 * And 'stats l' and 'stats' L:
565 * parv[3] = server mask ("*" defaulted, if omitted)
567 * parv[3] = port mask (returns p-lines when its port is matched by this)
568 * Or for stats k,K,i and I:
569 * parv[3] = [user@]host.name (returns which K/I-lines match this)
570 * or [user@]host.mask (returns which K/I-lines are mmatched by this)
571 * (defaults to old reply if ommitted, when local or Oper)
572 * A remote mask (something containing wildcards) is only
573 * allowed for IRC Operators.
575 * parv[3] = time param
576 * parv[4] = time param
577 * (see report_memleak_stats() in runmalloc.c for details)
579 * This function is getting really ugly. -Ghostwolf
581 int ms_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
583 struct Message *mptr;
584 struct Client *acptr;
585 struct ConfItem *aconf;
586 char stat = parc > 1 ? parv[1][0] : '\0';
589 if (hunt_stats(cptr, sptr, parc, parv, stat, 0) != HUNTED_ISME)
601 if (parc > 3 && !EmptyString(parv[3])) {
603 wilds = string_has_wildcards(name);
608 * Send info about connections which match, or all if the
609 * mask matches me.name. Only restrictions are on those who
610 * are invisible not being visible to 'foreigners' who use
611 * a wild card based search to list it.
613 send_reply(sptr, SND_EXPLICIT | RPL_STATSLINKINFO, "Connection SendQ "
614 "SendM SendKBytes RcveM RcveKBytes :Open since");
615 for (i = 0; i <= HighestFd; i++)
617 if (!(acptr = LocalClientArray[i]))
619 /* Don't return clients when this is a request for `all' */
620 if (doall && IsUser(acptr))
622 /* Don't show invisible people to unauthorized people when using
623 * wildcards -- Is this still needed now /stats is oper only ?
624 * Not here, because ms_stats is specifically a remote command,
625 * thus the check was removed. -Ghostwolf */
626 /* Only show the ones that match the given mask - if any */
627 if (!doall && wilds && match(name, cli_name(acptr)))
629 /* Skip all that do not match the specific query */
630 if (!(doall || wilds) && 0 != ircd_strcmp(name, cli_name(acptr)))
632 send_reply(sptr, SND_EXPLICIT | RPL_STATSLINKINFO,
633 "%s %u %u %u %u %u :%Tu", cli_name(acptr),
634 (int)MsgQLength(&(cli_sendQ(acptr))), (int)cli_sendM(acptr),
635 (int)cli_sendK(acptr), (int)cli_receiveM(acptr),
636 (int)cli_receiveK(acptr), CurrentTime - cli_firsttime(acptr));
642 report_configured_links(sptr, CONF_SERVER);
645 case 'e': /* report engine name */
646 send_reply(sptr, RPL_STATSENGINE, engine_name());
649 case 'g': /* send glines */
654 report_configured_links(sptr, CONF_HUB | CONF_LEAF);
657 case 'k': /* display CONF_IPKILL as well as CONF_KILL -Kev */
658 if (0 == report_klines(sptr, (parc > 3) ? parv[3] : 0, !IsOper(sptr)))
663 feature_report(sptr);
672 if (parc < 4 && IsOper(sptr)) {
673 report_configured_links(sptr, CONF_CLIENT);
676 if (parc < 4 || EmptyString(parv[3]))
677 return need_more_params(sptr, "STATS I");
680 wilds = string_has_wildcards(parv[3]);
686 for (aconf = GlobalConfList; aconf; aconf = aconf->next) {
687 if (CONF_CLIENT == aconf->status) {
688 if ((!wilds && (!match(aconf->host, host) ||
689 !match(aconf->name, host))) ||
690 (wilds && (!mmatch(host, aconf->host) ||
691 !mmatch(host, aconf->name))))
693 if (aconf->passwd && IsDigit(*aconf->passwd) &&
694 (!aconf->passwd[1] ||
695 (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])))
696 send_reply(sptr, RPL_STATSILINE, 'I', aconf->host,
697 aconf->passwd, aconf->name, aconf->port,
698 get_conf_class(aconf));
700 send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, "*",
701 aconf->name, aconf->port, get_conf_class(aconf));
712 send_reply(sptr, RPL_STATMEMTOT, fda_get_byte_count(),
713 fda_get_block_count());
717 for (mptr = msgtab; mptr->cmd; mptr++)
719 send_reply(sptr, RPL_STATSCOMMANDS, mptr->cmd, mptr->count,
724 report_configured_links(sptr, CONF_OPS);
729 * show listener ports
730 * show hidden ports to opers, if there are more than 3 parameters,
731 * interpret the fourth parameter as the port number, limit non-local
732 * or non-oper results to 8 ports.
734 show_ports(sptr, IsOper(sptr), (parc > 3) ? atoi(parv[3]) : 0, IsOper(sptr) ? 100 : 8);
739 send_usage(sptr, parv[0]);
743 report_crule_list(sptr, CRULE_ALL);
746 report_crule_list(sptr, CRULE_MASK);
749 tstats(sptr, parv[0]);
755 report_configured_links(sptr, CONF_UWORLD);
761 nowr = CurrentTime - cli_since(&me);
762 send_reply(sptr, RPL_STATSUPTIME, nowr / 86400, (nowr / 3600) % 24,
763 (nowr / 60) % 60, nowr % 60);
764 send_reply(sptr, RPL_STATSCONN, max_connection_count, max_client_count);
769 report_servers_verbose(sptr, stat);
778 class_send_meminfo(sptr);
779 send_listinfo(sptr, parv[0]);
784 report_classes(sptr);
788 count_memory(sptr, parv[0]);
794 send_reply(sptr, RPL_ENDOFSTATS, stat);
799 * mo_stats - oper message handler
801 * parv[0] = sender prefix
802 * parv[1] = statistics selector (defaults to Message frequency)
803 * parv[2] = target server (current server defaulted, if omitted)
804 * And 'stats l' and 'stats' L:
805 * parv[3] = server mask ("*" defaulted, if omitted)
807 * parv[3] = port mask (returns p-lines when its port is matched by this)
808 * Or for stats k,K,i and I:
809 * parv[3] = [user@]host.name (returns which K/I-lines match this)
810 * or [user@]host.mask (returns which K/I-lines are mmatched by this)
811 * (defaults to old reply if ommitted, when local or Oper)
812 * A remote mask (something containing wildcards) is only
813 * allowed for IRC Operators.
815 * parv[3] = time param
816 * parv[4] = time param
817 * (see report_memleak_stats() in runmalloc.c for details)
819 * This function is getting really ugly. -Ghostwolf
821 int mo_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
823 struct Message* mptr;
824 struct Client* acptr;
825 struct ConfItem* aconf;
826 char stat = parc > 1 ? parv[1][0] : '\0';
827 const char** infotext = statsinfo;
830 if (hunt_stats(cptr, sptr, parc, parv, stat, HEAD_IN_SAND_REMOTE)
839 int doall = 0, wilds = 0;
841 if (parc > 3 && !EmptyString(parv[3])) {
843 wilds = string_has_wildcards(name);
848 * Send info about connections which match, or all if the
849 * mask matches me.name. Only restrictions are on those who
850 * are invisible not being visible to 'foreigners' who use
851 * a wild card based search to list it.
853 send_reply(sptr, SND_EXPLICIT | RPL_STATSLINKINFO, "Connection SendQ "
854 "SendM SendKBytes RcveM RcveKBytes :Open since");
855 for (i = 0; i <= HighestFd; i++)
857 if (!(acptr = LocalClientArray[i]))
859 /* Don't return clients when this is a request for `all' */
860 if (doall && IsUser(acptr))
862 /* Only show the ones that match the given mask - if any */
863 if (!doall && wilds && match(name, cli_name(acptr)))
865 /* Skip all that do not match the specific query */
866 if (!(doall || wilds) && 0 != ircd_strcmp(name, cli_name(acptr)))
868 send_reply(sptr, SND_EXPLICIT | RPL_STATSLINKINFO,
869 "%s %u %u %u %u %u :%Tu", cli_name(acptr),
870 (int)MsgQLength(&(cli_sendQ(acptr))), (int)cli_sendM(acptr),
871 (int)cli_sendK(acptr), (int)cli_receiveM(acptr),
872 (int)cli_receiveK(acptr), CurrentTime - cli_firsttime(acptr));
878 report_configured_links(sptr, CONF_SERVER);
881 case 'e': /* report engine name */
882 send_reply(sptr, RPL_STATSENGINE, engine_name());
885 case 'g': /* send glines */
890 report_configured_links(sptr, CONF_HUB | CONF_LEAF);
893 case 'k': /* display CONF_IPKILL as well as CONF_KILL -Kev */
894 if (0 == report_klines(sptr, (parc > 3) ? parv[3] : 0, 0))
899 feature_report(sptr);
909 report_configured_links(sptr, CONF_CLIENT);
912 if (EmptyString(parv[3]))
913 return need_more_params(sptr, "STATS I");
916 wilds = string_has_wildcards(host);
918 for (aconf = GlobalConfList; aconf; aconf = aconf->next) {
919 if (CONF_CLIENT == aconf->status) {
920 if ((!wilds && (!match(aconf->host, host) ||
921 !match(aconf->name, host))) ||
922 (wilds && (!mmatch(host, aconf->host) ||
923 !mmatch(host, aconf->name))))
925 if (aconf->passwd && IsDigit(*aconf->passwd) &&
926 (!aconf->passwd[1] ||
927 (IsDigit(aconf->passwd[1]) && !aconf->passwd[2])))
928 send_reply(sptr, RPL_STATSILINE, 'I', aconf->host,
929 aconf->passwd, aconf->name, aconf->port,
930 get_conf_class(aconf));
932 send_reply(sptr, RPL_STATSILINE, 'I', aconf->host, "*",
933 aconf->name, aconf->port, get_conf_class(aconf));
944 send_reply(sptr, RPL_STATMEMTOT, fda_get_byte_count(),
945 fda_get_block_count());
949 for (mptr = msgtab; mptr->cmd; mptr++)
951 send_reply(sptr, RPL_STATSCOMMANDS, mptr->cmd, mptr->count,
956 report_configured_links(sptr, CONF_OPS);
961 * show listener ports
962 * show hidden ports to opers, if there are more than 3 parameters,
963 * interpret the fourth parameter as the port number, limit non-local
964 * or non-oper results to 8 ports.
966 show_ports(sptr, 1, (parc > 3) ? atoi(parv[3]) : 0, 100);
971 send_usage(sptr, parv[0]);
975 report_crule_list(sptr, CRULE_ALL);
978 report_crule_list(sptr, CRULE_MASK);
981 tstats(sptr, parv[0]);
987 report_configured_links(sptr, CONF_UWORLD);
993 nowr = CurrentTime - cli_since(&me);
994 send_reply(sptr, RPL_STATSUPTIME, nowr / 86400, (nowr / 3600) % 24,
995 (nowr / 60) % 60, nowr % 60);
996 send_reply(sptr, RPL_STATSCONN, max_connection_count, max_client_count);
1001 report_servers_verbose(sptr, stat);
1010 class_send_meminfo(sptr);
1011 send_listinfo(sptr, parv[0]);
1016 report_classes(sptr);
1020 count_memory(sptr, parv[0]);
1026 sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr, *infotext++);
1029 send_reply(sptr, RPL_ENDOFSTATS, stat);