]>
Commit | Line | Data |
---|---|---|
7efbed3b | 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. | |
12e82c05 | 3 | |
c09d4391 | 4 | diff -r d93ebdf15bd2 include/numeric.h |
5 | --- a/include/numeric.h Wed Feb 11 13:52:40 2009 +0100 | |
6 | +++ b/include/numeric.h Wed Feb 11 14:27:58 2009 +0100 | |
12e82c05 | 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 */ | |
c09d4391 | 15 | diff -r d93ebdf15bd2 ircd/class.c |
16 | --- a/ircd/class.c Wed Feb 11 13:52:40 2009 +0100 | |
17 | +++ b/ircd/class.c Wed Feb 11 14:27:58 2009 +0100 | |
c5aca5d6 | 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), | |
c09d4391 | 29 | diff -r d93ebdf15bd2 ircd/gline.c |
30 | --- a/ircd/gline.c Wed Feb 11 13:52:40 2009 +0100 | |
31 | +++ b/ircd/gline.c Wed Feb 11 14:27:58 2009 +0100 | |
c5aca5d6 | 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 : "", | |
c09d4391 | 43 | diff -r d93ebdf15bd2 ircd/hash.c |
44 | --- a/ircd/hash.c Wed Feb 11 13:52:40 2009 +0100 | |
45 | +++ b/ircd/hash.c Wed Feb 11 14:27:58 2009 +0100 | |
c5aca5d6 | 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]); | |
c09d4391 | 57 | diff -r d93ebdf15bd2 ircd/ircd_features.c |
58 | --- a/ircd/ircd_features.c Wed Feb 11 13:52:40 2009 +0100 | |
59 | +++ b/ircd/ircd_features.c Wed Feb 11 14:27:58 2009 +0100 | |
c5aca5d6 | 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)) || | |
c09d4391 | 71 | diff -r d93ebdf15bd2 ircd/ircd_res.c |
72 | --- a/ircd/ircd_res.c Wed Feb 11 13:52:40 2009 +0100 | |
73 | +++ b/ircd/ircd_res.c Wed Feb 11 14:27:58 2009 +0100 | |
12e82c05 | 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, | |
c09d4391 | 80 | + "DNS-Server"); |
12e82c05 | 81 | + |
82 | for (i = 0; i < irc_nscount; i++) | |
83 | { | |
84 | ircd_ntoa_r(ipaddr, &irc_nsaddr_list[i].addr); | |
c09d4391 | 85 | diff -r d93ebdf15bd2 ircd/listener.c |
86 | --- a/ircd/listener.c Wed Feb 11 13:52:40 2009 +0100 | |
87 | +++ b/ircd/listener.c Wed Feb 11 14:27:58 2009 +0100 | |
88 | @@ -139,6 +139,10 @@ | |
c5aca5d6 | 89 | |
90 | assert(0 != sptr); | |
c09d4391 | 91 | |
c5aca5d6 | 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"); | |
c09d4391 | 95 | + |
c5aca5d6 | 96 | if (param) |
97 | port = atoi(param); | |
c09d4391 | 98 | |
99 | diff -r d93ebdf15bd2 ircd/motd.c | |
100 | --- a/ircd/motd.c Wed Feb 11 13:52:40 2009 +0100 | |
101 | +++ b/ircd/motd.c Wed Feb 11 14:27:58 2009 +0100 | |
c5aca5d6 | 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); | |
c09d4391 | 113 | diff -r d93ebdf15bd2 ircd/s_auth.c |
114 | --- a/ircd/s_auth.c Wed Feb 11 13:52:40 2009 +0100 | |
115 | +++ b/ircd/s_auth.c Wed Feb 11 14:27:58 2009 +0100 | |
c5aca5d6 | 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", | |
c09d4391 | 138 | diff -r d93ebdf15bd2 ircd/s_debug.c |
139 | --- a/ircd/s_debug.c Wed Feb 11 13:52:40 2009 +0100 | |
140 | +++ b/ircd/s_debug.c Wed Feb 11 14:27:58 2009 +0100 | |
12e82c05 | 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 | } | |
c09d4391 | 150 | diff -r d93ebdf15bd2 ircd/s_err.c |
151 | --- a/ircd/s_err.c Wed Feb 11 13:52:40 2009 +0100 | |
152 | +++ b/ircd/s_err.c Wed Feb 11 14:27:58 2009 +0100 | |
12e82c05 | 153 | @@ -492,7 +492,7 @@ |
154 | /* 229 */ | |
155 | { 0 }, | |
156 | /* 230 */ | |
157 | - { 0 }, | |
158 | + { RPL_STATSHEADER, 0, "230" }, | |
159 | /* 231 */ | |
160 | { 0 }, | |
161 | /* 232 */ | |
c09d4391 | 162 | diff -r d93ebdf15bd2 ircd/s_stats.c |
163 | --- a/ircd/s_stats.c Wed Feb 11 13:52:40 2009 +0100 | |
164 | +++ b/ircd/s_stats.c Wed Feb 11 14:27:58 2009 +0100 | |
12e82c05 | 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) | |
c5aca5d6 | 171 | + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, "U Server"); |
12e82c05 | 172 | + else if (sd->sd_funcdata == CONF_SERVER) |
173 | + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, | |
c5aca5d6 | 174 | + "C Server * Port Hoplimit Hubmask Class"); |
12e82c05 | 175 | + else if (sd->sd_funcdata == CONF_OPERATOR) |
176 | + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, | |
c5aca5d6 | 177 | + "O Mask * Name Class"); |
12e82c05 | 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, | |
c5aca5d6 | 188 | + "D Server Rule"); |
12e82c05 | 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, | |
c5aca5d6 | 199 | + "I Hostmask Maximum IPmask Port Class"); |
12e82c05 | 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, | |
c5aca5d6 | 211 | + "K Mask \"Message/File\" \"Realname\" 0 0"); |
12e82c05 | 212 | + |
213 | for ( ; p; p = p->next) | |
214 | send_reply(to, RPL_STATSKLINE, p->bits > 0 ? 'k' : 'K', | |
215 | p->usermask ? p->usermask : "*", | |
c09d4391 | 216 | @@ -252,6 +275,10 @@ |
12e82c05 | 217 | else |
218 | host = mask; | |
c09d4391 | 219 | |
12e82c05 | 220 | + /* send header so the client knows what we are showing */ |
221 | + send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, | |
c5aca5d6 | 222 | + "K Mask \"Message/File\" \"Realname\" 0 0"); |
c09d4391 | 223 | + |
12e82c05 | 224 | for (conf = conf_get_deny_list(); conf; conf = conf->next) |
225 | { | |
c09d4391 | 226 | /* Skip this block if the user is searching for a user-matching |
12e82c05 | 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, | |
c09d4391 | 233 | + "Command Count Bytes"); |
12e82c05 | 234 | + |
235 | for (mptr = msgtab; mptr->cmd; mptr++) | |
236 | if (mptr->count) | |
237 | send_reply(to, RPL_STATSCOMMANDS, mptr->cmd, mptr->count, mptr->bytes); | |
c09d4391 | 238 | @@ -392,6 +423,10 @@ |
12e82c05 | 239 | { |
240 | struct qline *qline; | |
c09d4391 | 241 | |
12e82c05 | 242 | + /* send header so the client knows what we are showing */ |
243 | + send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, | |
c09d4391 | 244 | + "Q Channel :Reason"); |
245 | + | |
12e82c05 | 246 | for (qline = GlobalQuarantineList; qline; qline = qline->next) |
247 | { | |
c09d4391 | 248 | if (param && match(param, qline->chname)) /* narrow search */ |
249 | @@ -406,6 +441,8 @@ | |
250 | int y = 1, i = 1; | |
251 | struct sline *sline; | |
252 | ||
253 | + | |
254 | + /* TODO: use RPL_STATSHEADER here too instead of RPL_TEXT? */ | |
255 | if (IsAnOper(to)) | |
256 | send_reply(to, SND_EXPLICIT | RPL_TEXT, "# Type Spoofhost Realhost Ident"); | |
257 | else |