]>
Commit | Line | Data |
---|---|---|
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. | |
3 | ||
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 | |
7 | @@ -117,6 +117,7 @@ | |
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 */ | |
12 | ||
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 | |
18 | @@ -257,6 +257,10 @@ | |
19 | { | |
20 | struct ConnectionClass *cltmp; | |
21 | ||
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"); | |
25 | + | |
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 @@ | |
33 | struct Gline *gline; | |
34 | struct Gline *sgline; | |
35 | ||
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"); | |
39 | + | |
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 | |
46 | @@ -421,6 +421,10 @@ | |
47 | stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param) | |
48 | { | |
49 | int i; | |
50 | + | |
51 | + /* send header so the client knows what we are showing */ | |
52 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, "J Nick"); | |
53 | + | |
54 | for (i = 0; i < JUPEHASHSIZE; i++) | |
55 | if (jupeTable[i][0]) | |
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 | |
60 | @@ -827,6 +827,10 @@ | |
61 | { | |
62 | int i; | |
63 | ||
64 | + /* send header so the client knows what we are showing */ | |
65 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, | |
66 | + "F Feature/Log Value"); | |
67 | + | |
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 | |
74 | @@ -917,6 +917,10 @@ | |
75 | int i; | |
76 | char ipaddr[128]; | |
77 | ||
78 | + /* send header so the client knows what we are showing */ | |
79 | + send_reply(source_p, SND_EXPLICIT | RPL_STATSHEADER, | |
80 | + "A DNS-Server"); | |
81 | + | |
82 | for (i = 0; i < irc_nscount; i++) | |
83 | { | |
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 | |
88 | @@ -138,6 +138,10 @@ | |
89 | int len; | |
90 | ||
91 | assert(0 != sptr); | |
92 | + | |
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"); | |
96 | ||
97 | if (param) | |
98 | port = atoi(param); | |
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 | |
102 | @@ -433,6 +433,10 @@ | |
103 | { | |
104 | struct Motd *ptr; | |
105 | ||
106 | + /* send header so the client knows what we are showing */ | |
107 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, | |
108 | + "T Hostmask/Class File"); | |
109 | + | |
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 @@ | |
117 | { | |
118 | struct SLink *link; | |
119 | ||
120 | + /* send header so the client knows what we are showing */ | |
121 | + send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER, | |
122 | + "IAUTHCONF config"); | |
123 | + | |
124 | if (iauth) for (link = iauth->i_config; link; link = link->next) | |
125 | { | |
126 | send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s", | |
127 | @@ -2205,6 +2209,10 @@ | |
128 | { | |
129 | struct SLink *link; | |
130 | ||
131 | + /* send header so the client knows what we are showing */ | |
132 | + send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER, | |
133 | + "IAUTH info"); | |
134 | + | |
135 | if (iauth) for (link = iauth->i_stats; link; link = link->next) | |
136 | { | |
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 | |
141 | @@ -389,7 +389,7 @@ | |
142 | #endif | |
143 | ||
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, | |
148 | msgbuf_allocated); | |
149 | } | |
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 | |
153 | @@ -492,7 +492,7 @@ | |
154 | /* 229 */ | |
155 | { 0 }, | |
156 | /* 230 */ | |
157 | - { 0 }, | |
158 | + { RPL_STATSHEADER, 0, "230" }, | |
159 | /* 231 */ | |
160 | { 0 }, | |
161 | /* 232 */ | |
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 | |
165 | @@ -92,6 +92,16 @@ | |
166 | int maximum; | |
167 | char *host, *pass, *name, *username, *hub_limit; | |
168 | ||
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"); | |
178 | + | |
179 | for (tmp = GlobalConfList; tmp; tmp = tmp->next) | |
180 | { | |
181 | if ((tmp->status & sd->sd_funcdata)) | |
182 | @@ -137,6 +147,10 @@ | |
183 | { | |
184 | const struct CRuleConf* p = conf_get_crule_list(); | |
185 | ||
186 | + /* send header so the client knows what we are showing */ | |
187 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, | |
188 | + "D Server Rule"); | |
189 | + | |
190 | for ( ; p; p = p->next) | |
191 | { | |
192 | if (p->type & sd->sd_funcdata) | |
193 | @@ -167,6 +181,10 @@ | |
194 | int wilds = 0; | |
195 | int count = 1000; | |
196 | ||
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"); | |
200 | + | |
201 | if (!param) | |
202 | { | |
203 | stats_configured_links(to, sd, param); | |
204 | @@ -204,6 +222,11 @@ | |
205 | report_deny_list(struct Client* to) | |
206 | { | |
207 | const struct DenyConf* p = conf_get_deny_list(); | |
208 | + | |
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"); | |
212 | + | |
213 | for ( ; p; p = p->next) | |
214 | send_reply(to, RPL_STATSKLINE, p->bits > 0 ? 'k' : 'K', | |
215 | p->usermask ? p->usermask : "*", | |
216 | @@ -251,6 +274,10 @@ | |
217 | } | |
218 | else | |
219 | host = mask; | |
220 | + | |
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"); | |
224 | ||
225 | for (conf = conf_get_deny_list(); conf; conf = conf->next) | |
226 | { | |
227 | @@ -377,6 +404,10 @@ | |
228 | { | |
229 | struct Message *mptr; | |
230 | ||
231 | + /* send header so the client knows what we are showing */ | |
232 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, | |
233 | + "m Command Count Bytes"); | |
234 | + | |
235 | for (mptr = msgtab; mptr->cmd; mptr++) | |
236 | if (mptr->count) | |
237 | send_reply(to, RPL_STATSCOMMANDS, mptr->cmd, mptr->count, mptr->bytes); | |
238 | @@ -391,6 +422,10 @@ | |
239 | stats_quarantine(struct Client* to, const struct StatDesc* sd, char* param) | |
240 | { | |
241 | struct qline *qline; | |
242 | + | |
243 | + /* send header so the client knows what we are showing */ | |
244 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, | |
245 | + "Q Channel Reason"); | |
246 | ||
247 | for (qline = GlobalQuarantineList; qline; qline = qline->next) | |
248 | { |