]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - statsheader.patch
added cansendtochan.patch to move snircd chanmode checks into one central function...
[irc/quakenet/snircd-patchqueue.git] / statsheader.patch
CommitLineData
12e82c05 1add header to /STATS output and make TOTAL: line in /STATS z more clear.
2
3diff -r 92f6cb6562e2 include/numeric.h
4--- a/include/numeric.h Tue Jan 13 22:17:04 2009 +0000
c5aca5d6 5+++ b/include/numeric.h Mon Jan 19 00:27:57 2009 +0100
12e82c05 6@@ -117,6 +117,7 @@
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 */
11
12 /* RPL_SERVICEINFO 231 unused */
13 /* RPL_ENDOFSERVICES 232 unused */
c5aca5d6 14diff -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
17@@ -257,6 +257,10 @@
18 {
19 struct ConnectionClass *cltmp;
20
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");
24+
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),
28diff -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 @@
32 struct Gline *gline;
33 struct Gline *sgline;
34
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");
38+
39 gliter(GlobalGlineList, gline, sgline) {
40 send_reply(sptr, RPL_STATSGLINE, 'G',
41 gline->gl_nick ? gline->gl_nick : "",
42diff -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
45@@ -421,6 +421,10 @@
46 stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param)
47 {
48 int i;
49+
50+ /* send header so the client knows what we are showing */
51+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER, "J Nick");
52+
53 for (i = 0; i < JUPEHASHSIZE; i++)
54 if (jupeTable[i][0])
55 send_reply(to, RPL_STATSJLINE, jupeTable[i]);
56diff -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
59@@ -827,6 +827,10 @@
60 {
61 int i;
62
63+ /* send header so the client knows what we are showing */
64+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
65+ "F Feature/Log Value");
66+
67 for (i = 0; features[i].type; i++) {
68 if ((features[i].flags & FEAT_NODISP) ||
69 (features[i].flags & FEAT_MYOPER && !MyOper(to)) ||
12e82c05 70diff -r 92f6cb6562e2 ircd/ircd_res.c
71--- a/ircd/ircd_res.c Tue Jan 13 22:17:04 2009 +0000
c5aca5d6 72+++ b/ircd/ircd_res.c Mon Jan 19 00:27:57 2009 +0100
12e82c05 73@@ -917,6 +917,10 @@
74 int i;
75 char ipaddr[128];
76
77+ /* send header so the client knows what we are showing */
78+ send_reply(source_p, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 79+ "A DNS-Server");
12e82c05 80+
81 for (i = 0; i < irc_nscount; i++)
82 {
83 ircd_ntoa_r(ipaddr, &irc_nsaddr_list[i].addr);
c5aca5d6 84diff -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
87@@ -138,6 +138,10 @@
88 int len;
89
90 assert(0 != sptr);
91+
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");
95
96 if (param)
97 port = atoi(param);
98diff -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
101@@ -433,6 +433,10 @@
102 {
103 struct Motd *ptr;
104
105+ /* send header so the client knows what we are showing */
106+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
107+ "T Hostmask/Class File");
108+
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);
112diff -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 @@
116 {
117 struct SLink *link;
118
119+ /* send header so the client knows what we are showing */
120+ send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER,
121+ "IAUTHCONF config");
122+
123 if (iauth) for (link = iauth->i_config; link; link = link->next)
124 {
125 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
126@@ -2205,6 +2209,10 @@
127 {
128 struct SLink *link;
129
130+ /* send header so the client knows what we are showing */
131+ send_reply(cptr, SND_EXPLICIT | RPL_STATSHEADER,
132+ "IAUTH info");
133+
134 if (iauth) for (link = iauth->i_stats; link; link = link->next)
135 {
136 send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s",
12e82c05 137diff -r 92f6cb6562e2 ircd/s_debug.c
138--- a/ircd/s_debug.c Tue Jan 13 22:17:04 2009 +0000
c5aca5d6 139+++ b/ircd/s_debug.c Mon Jan 19 00:27:57 2009 +0100
12e82c05 140@@ -389,7 +389,7 @@
141 #endif
142
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,
147 msgbuf_allocated);
148 }
149diff -r 92f6cb6562e2 ircd/s_err.c
150--- a/ircd/s_err.c Tue Jan 13 22:17:04 2009 +0000
c5aca5d6 151+++ b/ircd/s_err.c Mon Jan 19 00:27:57 2009 +0100
12e82c05 152@@ -492,7 +492,7 @@
153 /* 229 */
154 { 0 },
155 /* 230 */
156- { 0 },
157+ { RPL_STATSHEADER, 0, "230" },
158 /* 231 */
159 { 0 },
160 /* 232 */
161diff -r 92f6cb6562e2 ircd/s_stats.c
162--- a/ircd/s_stats.c Tue Jan 13 22:17:04 2009 +0000
c5aca5d6 163+++ b/ircd/s_stats.c Mon Jan 19 00:27:57 2009 +0100
12e82c05 164@@ -92,6 +92,16 @@
165 int maximum;
166 char *host, *pass, *name, *username, *hub_limit;
167
168+ /* send header so the client knows what we are showing */
169+ if (sd->sd_funcdata == CONF_UWORLD)
c5aca5d6 170+ send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER, "U Server");
12e82c05 171+ else if (sd->sd_funcdata == CONF_SERVER)
172+ send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 173+ "C Server * Port Hoplimit Hubmask Class");
12e82c05 174+ else if (sd->sd_funcdata == CONF_OPERATOR)
175+ send_reply(sptr, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 176+ "O Mask * Name Class");
12e82c05 177+
178 for (tmp = GlobalConfList; tmp; tmp = tmp->next)
179 {
180 if ((tmp->status & sd->sd_funcdata))
181@@ -137,6 +147,10 @@
182 {
183 const struct CRuleConf* p = conf_get_crule_list();
184
185+ /* send header so the client knows what we are showing */
186+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 187+ "D Server Rule");
12e82c05 188+
189 for ( ; p; p = p->next)
190 {
191 if (p->type & sd->sd_funcdata)
192@@ -167,6 +181,10 @@
193 int wilds = 0;
194 int count = 1000;
195
196+ /* send header so the client knows what we are showing */
197+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 198+ "I Hostmask Maximum IPmask Port Class");
12e82c05 199+
200 if (!param)
201 {
202 stats_configured_links(to, sd, param);
203@@ -204,6 +222,11 @@
204 report_deny_list(struct Client* to)
205 {
206 const struct DenyConf* p = conf_get_deny_list();
207+
208+ /* send header so the client knows what we are showing */
209+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 210+ "K Mask \"Message/File\" \"Realname\" 0 0");
12e82c05 211+
212 for ( ; p; p = p->next)
213 send_reply(to, RPL_STATSKLINE, p->bits > 0 ? 'k' : 'K',
214 p->usermask ? p->usermask : "*",
215@@ -251,6 +274,10 @@
216 }
217 else
218 host = mask;
219+
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");
12e82c05 223
224 for (conf = conf_get_deny_list(); conf; conf = conf->next)
225 {
226@@ -377,6 +404,10 @@
227 {
228 struct Message *mptr;
229
230+ /* send header so the client knows what we are showing */
231+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 232+ "m Command Count Bytes");
12e82c05 233+
234 for (mptr = msgtab; mptr->cmd; mptr++)
235 if (mptr->count)
236 send_reply(to, RPL_STATSCOMMANDS, mptr->cmd, mptr->count, mptr->bytes);
237@@ -391,6 +422,10 @@
238 stats_quarantine(struct Client* to, const struct StatDesc* sd, char* param)
239 {
240 struct qline *qline;
241+
242+ /* send header so the client knows what we are showing */
243+ send_reply(to, SND_EXPLICIT | RPL_STATSHEADER,
c5aca5d6 244+ "Q Channel Reason");
12e82c05 245
246 for (qline = GlobalQuarantineList; qline; qline = qline->next)
247 {