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 Mon Jan 19 00:27:57 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/class.c
15 --- a/ircd/class.c Tue Jan 13 22:17:04 2009 +0000
16 +++ b/ircd/class.c Mon Jan 19 00:27:57 2009 +0100
19 struct ConnectionClass *cltmp;
21 + /* send header so the client knows what we are showing */
22 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
23 + "Y ConnClass PingFreq ConnFreq MaxLinks MaxSendQ Links");
25 for (cltmp = connClassList; cltmp; cltmp = cltmp->next)
26 send_reply(sptr, RPL_STATSYLINE, (cltmp->valid ? 'Y' : 'y'),
27 ConClass(cltmp), PingFreq(cltmp), ConFreq(cltmp),
28 diff -r 92f6cb6562e2 ircd/gline.c
29 --- a/ircd/gline.c Tue Jan 13 22:17:04 2009 +0000
30 +++ b/ircd/gline.c Mon Jan 19 00:27:57 2009 +0100
31 @@ -1295,6 +1295,10 @@
35 + /* send header so the client knows what we are showing */
36 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
37 + "G Mask Expire Lastmod Lifetime Status :Reason");
39 gliter(GlobalGlineList, gline, sgline) {
40 send_reply(sptr, RPL_STATSGLINE, 'G',
41 gline->gl_nick ? gline->gl_nick : "",
42 diff -r 92f6cb6562e2 ircd/hash.c
43 --- a/ircd/hash.c Tue Jan 13 22:17:04 2009 +0000
44 +++ b/ircd/hash.c Mon Jan 19 00:27:57 2009 +0100
46 stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param)
50 + /* send header so the client knows what we are showing */
51 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, "J Nick");
53 for (i = 0; i < JUPEHASHSIZE; i++)
55 send_reply(to, RPL_STATSJLINE, jupeTable[i]);
56 diff -r 92f6cb6562e2 ircd/ircd_features.c
57 --- a/ircd/ircd_features.c Tue Jan 13 22:17:04 2009 +0000
58 +++ b/ircd/ircd_features.c Mon Jan 19 00:27:57 2009 +0100
63 + /* send header so the client knows what we are showing */
64 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
65 + "F Feature/Log Value");
67 for (i = 0; features[i].type; i++) {
68 if ((features[i].flags & FEAT_NODISP) ||
69 (features[i].flags & FEAT_MYOPER && !MyOper(to)) ||
70 diff -r 92f6cb6562e2 ircd/ircd_res.c
71 --- a/ircd/ircd_res.c Tue Jan 13 22:17:04 2009 +0000
72 +++ b/ircd/ircd_res.c Mon Jan 19 00:27:57 2009 +0100
77 + /* send header so the client knows what we are showing */
78 + send_reply(source_p, SND_EXPLICIT | RPL_STATSHEADER,
81 for (i = 0; i < irc_nscount; i++)
83 ircd_ntoa_r(ipaddr, &irc_nsaddr_list[i].addr);
84 diff -r 92f6cb6562e2 ircd/listener.c
85 --- a/ircd/listener.c Tue Jan 13 22:17:04 2009 +0000
86 +++ b/ircd/listener.c Mon Jan 19 00:27:57 2009 +0100
92 + /* send header so the client knows what we are showing */
93 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
94 + "P Port Conns Flags Status");
98 diff -r 92f6cb6562e2 ircd/motd.c
99 --- a/ircd/motd.c Tue Jan 13 22:17:04 2009 +0000
100 +++ b/ircd/motd.c Mon Jan 19 00:27:57 2009 +0100
105 + /* send header so the client knows what we are showing */
106 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
107 + "T Hostmask/Class File");
109 for (ptr = MotdList.other; ptr; ptr = ptr->next)
110 send_reply(to, SND_EXPLICIT | RPL_STATSTLINE, "T %s %s",
111 ptr->hostmask, ptr->path);
112 diff -r 92f6cb6562e2 ircd/s_auth.c
113 --- a/ircd/s_auth.c Tue Jan 13 22:17:04 2009 +0000
114 +++ b/ircd/s_auth.c Mon Jan 19 00:27:57 2009 +0100
115 @@ -2189,6 +2189,10 @@
119 + /* send header so the client knows what we are showing */
120 + send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER,
121 + "IAUTHCONF config");
123 if (iauth) for (link = iauth->i_config; link; link = link->next)
125 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
126 @@ -2205,6 +2209,10 @@
130 + /* send header so the client knows what we are showing */
131 + send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER,
134 if (iauth) for (link = iauth->i_stats; link; link = link->next)
136 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
137 diff -r 92f6cb6562e2 ircd/s_debug.c
138 --- a/ircd/s_debug.c Tue Jan 13 22:17:04 2009 +0000
139 +++ b/ircd/s_debug.c Mon Jan 19 00:27:57 2009 +0100
143 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
144 - ":Total: ww %zu ch %zu cl %zu co %zu db %zu ms %zu mb %zu",
145 + ":Total: Whowas %zu Channels %zu Clients %zu Config %zu DBufs %zu Msgs %zu MsgBufs %zu",
146 totww, totch, totcl, com, dbufs_allocated, msg_allocated,
149 diff -r 92f6cb6562e2 ircd/s_err.c
150 --- a/ircd/s_err.c Tue Jan 13 22:17:04 2009 +0000
151 +++ b/ircd/s_err.c Mon Jan 19 00:27:57 2009 +0100
157 + { RPL_STATSHEADER, 0, "230" },
161 diff -r 92f6cb6562e2 ircd/s_stats.c
162 --- a/ircd/s_stats.c Tue Jan 13 22:17:04 2009 +0000
163 +++ b/ircd/s_stats.c Mon Jan 19 00:27:57 2009 +0100
166 char *host, *pass, *name, *username, *hub_limit;
168 + /* send header so the client knows what we are showing */
169 + if (sd->sd_funcdata == CONF_UWORLD)
170 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, "U Server");
171 + else if (sd->sd_funcdata == CONF_SERVER)
172 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
173 + "C Server * Port Hoplimit Hubmask Class");
174 + else if (sd->sd_funcdata == CONF_OPERATOR)
175 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
176 + "O Mask * Name Class");
178 for (tmp = GlobalConfList; tmp; tmp = tmp->next)
180 if ((tmp->status & sd->sd_funcdata))
183 const struct CRuleConf* p = conf_get_crule_list();
185 + /* send header so the client knows what we are showing */
186 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
189 for ( ; p; p = p->next)
191 if (p->type & sd->sd_funcdata)
196 + /* send header so the client knows what we are showing */
197 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
198 + "I Hostmask Maximum IPmask Port Class");
202 stats_configured_links(to, sd, param);
204 report_deny_list(struct Client* to)
206 const struct DenyConf* p = conf_get_deny_list();
208 + /* send header so the client knows what we are showing */
209 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
210 + "K Mask \"Message/File\" \"Realname\" 0 0");
212 for ( ; p; p = p->next)
213 send_reply(to, RPL_STATSKLINE, p->bits > 0 ? 'k' : 'K',
214 p->usermask ? p->usermask : "*",
220 + /* send header so the client knows what we are showing */
221 + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
222 + "K Mask \"Message/File\" \"Realname\" 0 0");
224 for (conf = conf_get_deny_list(); conf; conf = conf->next)
228 struct Message *mptr;
230 + /* send header so the client knows what we are showing */
231 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
232 + "m Command Count Bytes");
234 for (mptr = msgtab; mptr->cmd; mptr++)
236 send_reply(to, RPL_STATSCOMMANDS, mptr->cmd, mptr->count, mptr->bytes);
238 stats_quarantine(struct Client* to, const struct StatDesc* sd, char* param)
242 + /* send header so the client knows what we are showing */
243 + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
244 + "Q Channel Reason");
246 for (qline = GlobalQuarantineList; qline; qline = qline->next)