1 Add header to /STATS output and make TOTAL: line in /STATS z more clear,
2 so that we do not need to guess or lookup what exactly some of the output means.
4 diff -r 92f6cb6562e2 include/numeric.h
5 --- a/include/numeric.h Tue Jan 13 22:17:04 2009 +0000
6 +++ b/include/numeric.h Mon Jan 19 00:27:57 2009 +0100
8 RPL_STATSVLINE 227 unreal */
9 #define RPL_STATSALINE 226 /* Hybrid, Undernet */
10 #define RPL_STATSQLINE 228 /* Undernet extension */
11 +#define RPL_STATSHEADER 230 /* QuakeNet extension */
13 /* RPL_SERVICEINFO 231 unused */
14 /* RPL_ENDOFSERVICES 232 unused */
15 diff -r 92f6cb6562e2 ircd/class.c
16 --- a/ircd/class.c Tue Jan 13 22:17:04 2009 +0000
17 +++ b/ircd/class.c Mon Jan 19 00:27:57 2009 +0100
20 struct ConnectionClass *cltmp;
22 + /* send header so the client knows what we are showing */
23 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
24 + "Y ConnClass PingFreq ConnFreq MaxLinks MaxSendQ Links");
26 for (cltmp = connClassList; cltmp; cltmp = cltmp->next)
27 send_reply(sptr, RPL_STATSYLINE, (cltmp->valid ? 'Y' : 'y'),
28 ConClass(cltmp), PingFreq(cltmp), ConFreq(cltmp),
29 diff -r 92f6cb6562e2 ircd/gline.c
30 --- a/ircd/gline.c Tue Jan 13 22:17:04 2009 +0000
31 +++ b/ircd/gline.c Mon Jan 19 00:27:57 2009 +0100
32 @@ -1295,6 +1295,10 @@
36 + /* send header so the client knows what we are showing */
37 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
38 + "G Mask Expire Lastmod Lifetime Status :Reason");
40 gliter(GlobalGlineList, gline, sgline) {
41 send_reply(sptr, RPL_STATSGLINE, 'G',
42 gline->gl_nick ? gline->gl_nick : "",
43 diff -r 92f6cb6562e2 ircd/hash.c
44 --- a/ircd/hash.c Tue Jan 13 22:17:04 2009 +0000
45 +++ b/ircd/hash.c Mon Jan 19 00:27:57 2009 +0100
47 stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param)
51 + /* send header so the client knows what we are showing */
52 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, "J Nick");
54 for (i = 0; i < JUPEHASHSIZE; i++)
56 send_reply(to, RPL_STATSJLINE, jupeTable[i]);
57 diff -r 92f6cb6562e2 ircd/ircd_features.c
58 --- a/ircd/ircd_features.c Tue Jan 13 22:17:04 2009 +0000
59 +++ b/ircd/ircd_features.c Mon Jan 19 00:27:57 2009 +0100
64 + /* send header so the client knows what we are showing */
65 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
66 + "F Feature/Log Value");
68 for (i = 0; features[i].type; i++) {
69 if ((features[i].flags & FEAT_NODISP) ||
70 (features[i].flags & FEAT_MYOPER && !MyOper(to)) ||
71 diff -r 92f6cb6562e2 ircd/ircd_res.c
72 --- a/ircd/ircd_res.c Tue Jan 13 22:17:04 2009 +0000
73 +++ b/ircd/ircd_res.c Mon Jan 19 00:27:57 2009 +0100
78 + /* send header so the client knows what we are showing */
79 + send_reply(source_p, SND_EXPLICIT | RPL_STATSHEADER,
82 for (i = 0; i < irc_nscount; i++)
84 ircd_ntoa_r(ipaddr, &irc_nsaddr_list[i].addr);
85 diff -r 92f6cb6562e2 ircd/listener.c
86 --- a/ircd/listener.c Tue Jan 13 22:17:04 2009 +0000
87 +++ b/ircd/listener.c Mon Jan 19 00:27:57 2009 +0100
93 + /* send header so the client knows what we are showing */
94 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
95 + "P Port Conns Flags Status");
99 diff -r 92f6cb6562e2 ircd/motd.c
100 --- a/ircd/motd.c Tue Jan 13 22:17:04 2009 +0000
101 +++ b/ircd/motd.c Mon Jan 19 00:27:57 2009 +0100
106 + /* send header so the client knows what we are showing */
107 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
108 + "T Hostmask/Class File");
110 for (ptr = MotdList.other; ptr; ptr = ptr->next)
111 send_reply(to, SND_EXPLICIT | RPL_STATSTLINE, "T %s %s",
112 ptr->hostmask, ptr->path);
113 diff -r 92f6cb6562e2 ircd/s_auth.c
114 --- a/ircd/s_auth.c Tue Jan 13 22:17:04 2009 +0000
115 +++ b/ircd/s_auth.c Mon Jan 19 00:27:57 2009 +0100
116 @@ -2189,6 +2189,10 @@
120 + /* send header so the client knows what we are showing */
121 + send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER,
122 + "IAUTHCONF config");
124 if (iauth) for (link = iauth->i_config; link; link = link->next)
126 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
127 @@ -2205,6 +2209,10 @@
131 + /* send header so the client knows what we are showing */
132 + send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER,
135 if (iauth) for (link = iauth->i_stats; link; link = link->next)
137 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
138 diff -r 92f6cb6562e2 ircd/s_debug.c
139 --- a/ircd/s_debug.c Tue Jan 13 22:17:04 2009 +0000
140 +++ b/ircd/s_debug.c Mon Jan 19 00:27:57 2009 +0100
144 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
145 - ":Total: ww %zu ch %zu cl %zu co %zu db %zu ms %zu mb %zu",
146 + ":Total: Whowas %zu Channels %zu Clients %zu Config %zu DBufs %zu Msgs %zu MsgBufs %zu",
147 totww, totch, totcl, com, dbufs_allocated, msg_allocated,
150 diff -r 92f6cb6562e2 ircd/s_err.c
151 --- a/ircd/s_err.c Tue Jan 13 22:17:04 2009 +0000
152 +++ b/ircd/s_err.c Mon Jan 19 00:27:57 2009 +0100
158 + { RPL_STATSHEADER, 0, "230" },
162 diff -r 92f6cb6562e2 ircd/s_stats.c
163 --- a/ircd/s_stats.c Tue Jan 13 22:17:04 2009 +0000
164 +++ b/ircd/s_stats.c Mon Jan 19 00:27:57 2009 +0100
167 char *host, *pass, *name, *username, *hub_limit;
169 + /* send header so the client knows what we are showing */
170 + if (sd->sd_funcdata == CONF_UWORLD)
171 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, "U Server");
172 + else if (sd->sd_funcdata == CONF_SERVER)
173 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
174 + "C Server * Port Hoplimit Hubmask Class");
175 + else if (sd->sd_funcdata == CONF_OPERATOR)
176 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
177 + "O Mask * Name Class");
179 for (tmp = GlobalConfList; tmp; tmp = tmp->next)
181 if ((tmp->status & sd->sd_funcdata))
184 const struct CRuleConf* p = conf_get_crule_list();
186 + /* send header so the client knows what we are showing */
187 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
190 for ( ; p; p = p->next)
192 if (p->type & sd->sd_funcdata)
197 + /* send header so the client knows what we are showing */
198 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
199 + "I Hostmask Maximum IPmask Port Class");
203 stats_configured_links(to, sd, param);
205 report_deny_list(struct Client* to)
207 const struct DenyConf* p = conf_get_deny_list();
209 + /* send header so the client knows what we are showing */
210 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
211 + "K Mask \"Message/File\" \"Realname\" 0 0");
213 for ( ; p; p = p->next)
214 send_reply(to, RPL_STATSKLINE, p->bits > 0 ? 'k' : 'K',
215 p->usermask ? p->usermask : "*",
221 + /* send header so the client knows what we are showing */
222 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
223 + "K Mask \"Message/File\" \"Realname\" 0 0");
225 for (conf = conf_get_deny_list(); conf; conf = conf->next)
229 struct Message *mptr;
231 + /* send header so the client knows what we are showing */
232 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
233 + "m Command Count Bytes");
235 for (mptr = msgtab; mptr->cmd; mptr++)
237 send_reply(to, RPL_STATSCOMMANDS, mptr->cmd, mptr->count, mptr->bytes);
239 stats_quarantine(struct Client* to, const struct StatDesc* sd, char* param)
243 + /* send header so the client knows what we are showing */
244 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
245 + "Q Channel Reason");
247 for (qline = GlobalQuarantineList; qline; qline = qline->next)