1 add header to /STATS output and make TOTAL: line in /STATS z more clear.
3 diff -r 92f6cb6562e2 include/numeric.h
4 --- a/include/numeric.h Tue Jan 13 22:17:04 2009 +0000
5 +++ b/include/numeric.h Sun Jan 18 17:44:05 2009 +0100
7 RPL_STATSVLINE 227 unreal */
8 #define RPL_STATSALINE 226 /* Hybrid, Undernet */
9 #define RPL_STATSQLINE 228 /* Undernet extension */
10 +#define RPL_STATSHEADER 230 /* QuakeNet extension */
12 /* RPL_SERVICEINFO 231 unused */
13 /* RPL_ENDOFSERVICES 232 unused */
14 diff -r 92f6cb6562e2 ircd/ircd_res.c
15 --- a/ircd/ircd_res.c Tue Jan 13 22:17:04 2009 +0000
16 +++ b/ircd/ircd_res.c Sun Jan 18 17:44:05 2009 +0100
21 + /* send header so the client knows what we are showing */
22 + send_reply(source_p, SND_EXPLICIT | RPL_STATSHEADER,
25 for (i = 0; i < irc_nscount; i++)
27 ircd_ntoa_r(ipaddr, &irc_nsaddr_list[i].addr);
28 diff -r 92f6cb6562e2 ircd/s_debug.c
29 --- a/ircd/s_debug.c Tue Jan 13 22:17:04 2009 +0000
30 +++ b/ircd/s_debug.c Sun Jan 18 17:44:05 2009 +0100
34 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
35 - ":Total: ww %zu ch %zu cl %zu co %zu db %zu ms %zu mb %zu",
36 + ":Total: Whowas %zu Channels %zu Clients %zu Config %zu DBufs %zu Msgs %zu MsgBufs %zu",
37 totww, totch, totcl, com, dbufs_allocated, msg_allocated,
40 diff -r 92f6cb6562e2 ircd/s_err.c
41 --- a/ircd/s_err.c Tue Jan 13 22:17:04 2009 +0000
42 +++ b/ircd/s_err.c Sun Jan 18 17:44:05 2009 +0100
48 + { RPL_STATSHEADER, 0, "230" },
52 diff -r 92f6cb6562e2 ircd/s_stats.c
53 --- a/ircd/s_stats.c Tue Jan 13 22:17:04 2009 +0000
54 +++ b/ircd/s_stats.c Sun Jan 18 17:44:05 2009 +0100
57 char *host, *pass, *name, *username, *hub_limit;
59 + /* send header so the client knows what we are showing */
60 + if (sd->sd_funcdata == CONF_UWORLD)
61 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, "U server");
62 + else if (sd->sd_funcdata == CONF_SERVER)
63 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
64 + "C server * port hoplimit hubmask class");
65 + else if (sd->sd_funcdata == CONF_OPERATOR)
66 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
67 + "O user@host * name class");
69 for (tmp = GlobalConfList; tmp; tmp = tmp->next)
71 if ((tmp->status & sd->sd_funcdata))
74 const struct CRuleConf* p = conf_get_crule_list();
76 + /* send header so the client knows what we are showing */
77 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
78 + "%c server rule", p->type & CRULE_ALL ? 'D' : 'd');
80 for ( ; p; p = p->next)
82 if (p->type & sd->sd_funcdata)
87 + /* send header so the client knows what we are showing */
88 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
89 + "I [user@]hostmask maximum IPmask port class");
93 stats_configured_links(to, sd, param);
95 report_deny_list(struct Client* to)
97 const struct DenyConf* p = conf_get_deny_list();
99 + /* send header so the client knows what we are showing */
100 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
101 + "K user@host \"message or path/file\" \"realname\" 0 0");
103 for ( ; p; p = p->next)
104 send_reply(to, RPL_STATSKLINE, p->bits > 0 ? 'k' : 'K',
105 p->usermask ? p->usermask : "*",
111 + /* send header so the client knows what we are showing */
112 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
113 + "K user@host \"message or path/file\" \"realname\" 0 0");
115 for (conf = conf_get_deny_list(); conf; conf = conf->next)
119 struct Message *mptr;
121 + /* send header so the client knows what we are showing */
122 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
123 + "m command count bytes");
125 for (mptr = msgtab; mptr->cmd; mptr++)
127 send_reply(to, RPL_STATSCOMMANDS, mptr->cmd, mptr->count, mptr->bytes);
129 stats_quarantine(struct Client* to, const struct StatDesc* sd, char* param)
133 + /* send header so the client knows what we are showing */
134 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
135 + "Q channel reason");
137 for (qline = GlobalQuarantineList; qline; qline = qline->next)