1 make use of the SND_EXPLICIT flag to specify a pattern, reducing most output from 2 lines to 1 line
2 few minor other changes:
3 changed hidden to delayedjoin,
4 changed no modes <none> to just + same as /MODE shows
5 added zombie and delayedjoin prefix to header for check channel
6 changed all (timestamp) output to [timestamp] seems more consistent with other places (e.g. snomask HACK MODEs)
7 added [<remote server>] param to syntax of command in the comments
9 diff -r a698927b198f ircd/m_check.c
16 - * Syntax: CHECK <channel|nick|server|hostmask> [-flags]
17 + * Syntax: CHECK [<remote server>] <channel|nick|server|hostmask> [-flags]
19 * Where valid flags are:
20 * -c: Show channels when checking a hostmask.
22 char *zombie, *showlevel;
24 if (flags & CHECK_SHOWUSERS) {
25 - send_reply(sptr, RPL_DATASTR, "Users (@ = op, + = voice)");
26 + send_reply(sptr, RPL_DATASTR, ":Users (! = zombie, @ = op, + = voice, < = delayedjoin)");
29 if (flags & CHECK_CLONES) {
34 - send_reply(sptr, RPL_DATASTR, " ");
35 + send_reply(sptr, RPL_DATASTR, ": ");
37 if (flags & CHECK_CLONES) {
38 - ircd_snprintf(0, outbuf, sizeof(outbuf),
39 - "Total users:: %d (%d ops, %d voiced, %d clones, %d authed, %d hidden)",
40 - cntr, opcntr, vcntr, clones, authed, delayedjoin);
41 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR,
42 + ":Total users:: %d (%d ops, %d voiced, %d clones, %d authed, %d delayedjoin)",
43 + cntr, opcntr, vcntr, clones, authed, delayedjoin);
45 for (lp = chptr->members; lp; lp = lp->next_member) {
46 cli_marker(lp->user) = 0;
49 - ircd_snprintf(0, outbuf, sizeof(outbuf),
50 - "Total users:: %d (%d ops, %d voiced, %d authed, %d hidden)",
51 - cntr, opcntr, vcntr, authed, delayedjoin);
52 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR,
53 + ":Total users:: %d (%d ops, %d voiced, %d authed, %d delayedjoin)",
54 + cntr, opcntr, vcntr, authed, delayedjoin);
57 - send_reply(sptr, RPL_DATASTR, outbuf);
58 - send_reply(sptr, RPL_DATASTR, " ");
59 + send_reply(sptr, RPL_DATASTR, ": ");
61 /* Do not display bans if ! flags & CHECK_SHOWUSERS */
62 if (flags & CHECK_SHOWUSERS) {
63 - send_reply(sptr, RPL_DATASTR, "Bans on channel::");
64 + send_reply(sptr, RPL_DATASTR, ":Bans on channel::");
66 for (ban = chptr->banlist; ban; ban = ban->next) {
67 - ircd_snprintf(0, outbuf, sizeof(outbuf), "[%d] - %s - Set by %s, on %s (%Tu)",
68 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR,
69 + ":[%d] - %s - Set by %s, on %s [%Tu]",
70 ++bans, ban->banstr, ban->who, myctime(ban->when), ban->when);
71 - send_reply(sptr, RPL_DATASTR, outbuf);
75 - send_reply(sptr, RPL_DATASTR, "<none>");
76 + send_reply(sptr, RPL_DATASTR, ":<none>");
79 send_reply(sptr, RPL_ENDOFCHECK, " ");
82 void checkChannel(struct Client *sptr, struct Channel *chptr) {
83 - char outbuf[TOPICLEN + MODEBUFLEN + 64], modebuf[MODEBUFLEN], parabuf[MODEBUFLEN];
84 + char modebuf[MODEBUFLEN], parabuf[MODEBUFLEN];
87 - send_reply(sptr, RPL_DATASTR, " ");
88 + send_reply(sptr, RPL_DATASTR, ": ");
89 send_reply(sptr, RPL_CHKHEAD, "channel", chptr->chname);
90 - send_reply(sptr, RPL_DATASTR, " ");
91 + send_reply(sptr, RPL_DATASTR, ": ");
94 - ircd_snprintf(sptr, outbuf, sizeof(outbuf), " Creation time:: %s (%Tu)", myctime(chptr->creationtime), chptr->creationtime);
95 - send_reply(sptr, RPL_DATASTR, outbuf);
96 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Creation time:: %s [%Tu]",
97 + myctime(chptr->creationtime), chptr->creationtime);
100 if (strlen(chptr->topic) <= 0)
101 - send_reply(sptr, RPL_DATASTR, " Topic:: <none>");
102 + send_reply(sptr, RPL_DATASTR, ": Topic:: <none>");
104 - ircd_snprintf(sptr, outbuf, sizeof(outbuf), " Topic:: %s", chptr->topic);
105 - send_reply(sptr, RPL_DATASTR, outbuf);
106 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Topic:: %s", chptr->topic);
109 - ircd_snprintf(sptr, outbuf, sizeof(outbuf), " Set by:: %s", chptr->topic_nick);
110 - send_reply(sptr, RPL_DATASTR, outbuf);
111 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Set by:: %s", chptr->topic_nick);
113 - ircd_snprintf(sptr, outbuf, sizeof(outbuf), " Set at:: %s (%Tu)", myctime(chptr->topic_time), chptr->topic_time);
114 - send_reply(sptr, RPL_DATASTR, outbuf);
115 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Set at:: %s [%Tu]", myctime(chptr->topic_time), chptr->topic_time);
120 - strcpy(outbuf, "Channel mode(s):: ");
125 - channel_modes(sptr, modebuf, parabuf, sizeof(modebuf), chptr, NULL);
127 - if(modebuf[1] == '\0')
128 - strcat(outbuf, "<none>");
129 - else if(*parabuf) {
130 - strcat(outbuf, modebuf);
131 - strcat(outbuf, " ");
132 - strcat(outbuf, parabuf);
135 - strcat(outbuf, modebuf);
137 - send_reply(sptr, RPL_DATASTR, outbuf);
141 + channel_modes(sptr, modebuf, parabuf, sizeof(parabuf), chptr, NULL);
142 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":Channel mode(s):: %s %s",
143 + modebuf ? modebuf : "+", parabuf);
145 /* Don't send 'END OF CHECK' message, it's sent in checkUsers, which is called after this. */
147 @@ -415,53 +398,45 @@
148 struct Channel *chptr;
149 struct Membership *lp;
150 struct irc_sockaddr sin;
151 - char outbuf[BUFSIZE];
156 - send_reply(sptr, RPL_DATASTR, " ");
157 + send_reply(sptr, RPL_DATASTR, ": ");
158 send_reply(sptr, RPL_CHKHEAD, "user", cli_name(acptr));
159 - send_reply(sptr, RPL_DATASTR, " ");
160 + send_reply(sptr, RPL_DATASTR, ": ");
162 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Nick:: %s (%s%s)", cli_name(acptr), NumNick(acptr));
163 - send_reply(sptr, RPL_DATASTR, outbuf);
164 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Nick:: %s (%s%s)", cli_name(acptr), NumNick(acptr));
166 - if (MyUser(acptr)) {
167 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Signed on:: %s (%Tu)", myctime(acptr->cli_firsttime), acptr->cli_firsttime);
168 - send_reply(sptr, RPL_DATASTR, outbuf);
171 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Signed on:: %s [%Tu]", myctime(acptr->cli_firsttime), acptr->cli_firsttime);
173 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Timestamp:: %s (%d)", myctime(acptr->cli_lastnick), acptr->cli_lastnick);
174 - send_reply(sptr, RPL_DATASTR, outbuf);
175 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Timestamp:: %s [%d]", myctime(acptr->cli_lastnick), acptr->cli_lastnick);
177 - ircd_snprintf(0, outbuf, sizeof(outbuf), " User/Hostmask:: %s@%s [%s] (Clients: %hu)", cli_user(acptr)->username, cli_user(acptr)->host,
178 - ircd_ntoa(&(cli_ip(acptr))), IPcheck_nr(acptr));
179 - send_reply(sptr, RPL_DATASTR, outbuf);
180 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": User/Hostmask:: %s@%s [%s] (Clients: %hu)",
181 + cli_user(acptr)->username, cli_user(acptr)->host, ircd_ntoa(&(cli_ip(acptr))), IPcheck_nr(acptr));
183 - if (IsSetHost(acptr) || HasHiddenHost(acptr)) {
184 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Real User/Host:: %s@%s", cli_user(acptr)->realusername, cli_user(acptr)->realhost);
185 - send_reply(sptr, RPL_DATASTR, outbuf);
187 + if (IsSetHost(acptr) || HasHiddenHost(acptr))
188 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Real User/Host:: %s@%s", cli_user(acptr)->realusername, cli_user(acptr)->realhost);
190 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Real Name:: %s%c", cli_info(acptr), COLOR_OFF);
191 - send_reply(sptr, RPL_DATASTR, outbuf);
193 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Real Name:: %s", cli_info(acptr));
195 if( IsService(cli_user(acptr)->server)) {
196 if (IsChannelService(acptr))
197 - send_reply(sptr, RPL_DATASTR, " Status:: Network Service");
198 + send_reply(sptr, RPL_DATASTR, ": Status:: Network Service");
199 else if (IsAnOper(acptr))
200 - send_reply(sptr, RPL_DATASTR, " Status:: IRC Operator (service) (ID: %s)", cli_user(acptr)->opername ? cli_user(acptr)->opername : "<unknown>");
201 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Status:: IRC Operator (service) (ID: %s)", cli_user(acptr)->opername ? cli_user(acptr)->opername : "<unknown>");
203 - send_reply(sptr, RPL_DATASTR, " Status:: Client (service)");
204 - } else if (IsAnOper(acptr)) {
205 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Status:: IRC Operator (ID: %s)", cli_user(acptr)->opername ? cli_user(acptr)->opername : "<unknown>");
206 - send_reply(sptr, RPL_DATASTR, outbuf);
208 - send_reply(sptr, RPL_DATASTR, " Status:: Client");
209 + send_reply(sptr, RPL_DATASTR, ": Status:: Client (service)");
210 + } else if (IsAnOper(acptr))
211 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Status:: IRC Operator (ID: %s)",
212 + cli_user(acptr)->opername ? cli_user(acptr)->opername : "<unknown>");
214 + /* this really needed ? */
215 + send_reply(sptr, RPL_DATASTR, ": Status:: Client");
217 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Connected to:: %s (Hops: %d)", cli_name(cli_user(acptr)->server), cli_hopcount(acptr));
218 - send_reply(sptr, RPL_DATASTR, outbuf);
219 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Connected to:: %s (Hops: %d)", cli_name(cli_user(acptr)->server), cli_hopcount(acptr));
221 /* +s (SERV_NOTICE) is not relayed to us from remote servers,
222 * so we cannot tell if a remote client has that mode set.
223 @@ -471,11 +446,10 @@
225 /* show the usermodes and account info (but not OperID and sethost) */
226 umodes = umode_str(acptr, UMODE_AND_ACCOUNT);
227 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Usermode(s):: %s%s", *umodes ? "+" : "<none>", umodes);
228 - send_reply(sptr, RPL_DATASTR, outbuf);
229 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Usermode(s):: +%s", umodes);
231 if (cli_user(acptr)->joined == 0)
232 - send_reply(sptr, RPL_DATASTR, " Channel(s):: <none>");
233 + send_reply(sptr, RPL_DATASTR, ": Channel(s):: <none>");
234 else if (cli_user(acptr)->joined > 50) {
236 /* NB. As a sanity check, we DO NOT show the individual channels the
237 @@ -485,22 +459,21 @@
238 * they are on *that* many).
241 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Channel(s):: - (total: %u)", cli_user(acptr)->joined);
242 - send_reply(sptr, RPL_DATASTR, outbuf);
243 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Channel(s):: - (total: %u)", cli_user(acptr)->joined);
246 char chntext[BUFSIZE];
247 - int len = strlen(" Channel(s):: ");
248 + int len = strlen(": Channel(s):: ");
249 int mlen = strlen(me.cli_name) + len + strlen(cli_name(sptr));
252 - strcpy(chntext, " Channel(s):: ");
253 + strcpy(chntext, ": Channel(s):: ");
254 for (lp = cli_user(acptr)->channel; lp; lp = lp->next_channel) {
256 if (len + strlen(chptr->chname) + mlen > BUFSIZE - 5) {
257 send_reply(sptr, RPL_DATASTR, chntext);
259 - strcpy(chntext, " Channel(s):: ");
260 + strcpy(chntext, ": Channel(s):: ");
261 len = strlen(chntext);
264 @@ -530,39 +503,31 @@
267 nowr = CurrentTime - cli_user(acptr)->last;
268 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Idle for:: %d days, %02ld:%02ld:%02ld",
269 - nowr / 86400, (nowr / 3600) % 24, (nowr / 60) % 60, nowr % 60);
270 - send_reply(sptr, RPL_DATASTR, outbuf);
271 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Idle for:: %d days, %02ld:%02ld:%02ld",
272 + nowr / 86400, (nowr / 3600) % 24, (nowr / 60) % 60, nowr % 60);
275 /* Away message (if applicable) */
276 - if (cli_user(acptr)->away) {
277 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Away message:: %s", cli_user(acptr)->away);
278 - send_reply(sptr, RPL_DATASTR, outbuf);
280 + if (cli_user(acptr)->away)
281 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Away message:: %s", cli_user(acptr)->away);
283 /* If local user.. */
285 os_get_peername(con_fd(cli_connect(sptr)), &sin);
287 - send_reply(sptr, RPL_DATASTR, " ");
288 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Ports:: %d -> %d (client -> server)",
289 - sin.port, cli_listener(acptr)->addr.port);
290 - send_reply(sptr, RPL_DATASTR, outbuf);
291 + send_reply(sptr, RPL_DATASTR, ": ");
292 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Ports:: %d -> %d (client -> server)",
293 + sin.port, cli_listener(acptr)->addr.port);
294 if (feature_bool(FEAT_EXTENDED_CHECKCMD)) {
295 /* Note: sendq = receiveq for a client (it makes sense really) */
296 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Data sent:: %lu.%0.3u Kb (%u protocol messages)",
297 - (unsigned long)cli_receiveB(acptr) / 1024, (unsigned long)cli_receiveB(acptr) % 1024, cli_receiveM(acptr));
298 - send_reply(sptr, RPL_DATASTR, outbuf);
299 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Data received:: %lu.%0.3lu Kb (%u protocol messages)",
300 - (unsigned long)cli_sendB(acptr) / 1024, (unsigned long)cli_sendB(acptr) % 1024, cli_sendM(acptr));
301 - send_reply(sptr, RPL_DATASTR, outbuf);
302 - ircd_snprintf(0, outbuf, sizeof(outbuf), " receiveQ size:: %d bytes (max. %d bytes)",
303 - DBufLength(&(cli_recvQ(acptr))), feature_int(FEAT_CLIENT_FLOOD));
304 - send_reply(sptr, RPL_DATASTR, outbuf);
305 - ircd_snprintf(0, outbuf, sizeof(outbuf), " sendQ size:: %d bytes (max. %d bytes)",
306 - DBufLength(&(cli_sendQ(acptr))), get_sendq(acptr));
307 - send_reply(sptr, RPL_DATASTR, outbuf);
308 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Data sent:: %lu.%0.3u Kb (%u protocol messages)",
309 + (unsigned long)cli_receiveB(acptr) / 1024, (unsigned long)cli_receiveB(acptr) % 1024, cli_receiveM(acptr));
310 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Data received:: %lu.%0.3lu Kb (%u protocol messages)",
311 + (unsigned long)cli_sendB(acptr) / 1024, (unsigned long)cli_sendB(acptr) % 1024, cli_sendM(acptr));
312 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": receiveQ size:: %d bytes (max. %d bytes)",
313 + DBufLength(&(cli_recvQ(acptr))), feature_int(FEAT_CLIENT_FLOOD));
314 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": sendQ size:: %d bytes (max. %d bytes)",
315 + DBufLength(&(cli_sendQ(acptr))), get_sendq(acptr));
319 @@ -571,50 +536,50 @@
322 void checkServer(struct Client *sptr, struct Client *acptr) {
323 - char outbuf[BUFSIZE];
326 - send_reply(sptr, RPL_DATASTR, " ");
327 + send_reply(sptr, RPL_DATASTR, ": ");
328 send_reply(sptr, RPL_CHKHEAD, "server", acptr->cli_name);
329 - send_reply(sptr, RPL_DATASTR, " ");
330 + send_reply(sptr, RPL_DATASTR, ": ");
332 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Connected at:: %s (%Tu)", myctime(acptr->cli_serv->timestamp), acptr->cli_serv->timestamp);
333 - send_reply(sptr, RPL_DATASTR, outbuf);
334 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Connected at:: %s [%Tu]",
335 + myctime(acptr->cli_serv->timestamp), acptr->cli_serv->timestamp);
337 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Server name:: %s", acptr->cli_name);
338 - send_reply(sptr, RPL_DATASTR, outbuf);
339 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Server name:: %s", acptr->cli_name);
341 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Numeric:: %s --> %d", NumServ(acptr), base64toint(acptr->cli_yxx));
342 - send_reply(sptr, RPL_DATASTR, outbuf);
343 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Numeric:: %s --> %d",
344 + NumServ(acptr), base64toint(acptr->cli_yxx));
346 - ircd_snprintf(0, outbuf, sizeof(outbuf), " Users:: %d / %d", (acptr == &me) ? UserStats.local_clients : cli_serv(acptr)->clients,
347 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Users:: %d / %d",
348 + (acptr == &me) ? UserStats.local_clients : cli_serv(acptr)->clients,
349 base64toint(cli_serv(acptr)->nn_capacity));
350 - send_reply(sptr, RPL_DATASTR, outbuf);
353 - send_reply(sptr, RPL_DATASTR, " Status:: Bursting");
354 + send_reply(sptr, RPL_DATASTR, ": Status:: Bursting");
355 else if (IsBurstAck(acptr))
356 - send_reply(sptr, RPL_DATASTR, " Status:: Awaiting EOB Ack");
357 + send_reply(sptr, RPL_DATASTR, ": Status:: Awaiting EOB Ack");
358 else if (IsService(acptr))
359 - send_reply(sptr, RPL_DATASTR, " Status:: Network Service");
360 + send_reply(sptr, RPL_DATASTR, ": Status:: Network Service");
361 else if (IsHub(acptr))
362 - send_reply(sptr, RPL_DATASTR, " Status:: Network Hub");
363 + send_reply(sptr, RPL_DATASTR, ": Status:: Network Hub");
365 if (feature_bool(FEAT_EXTENDED_CHECKCMD)) {
367 struct DLink* slink = NULL;
369 - send_reply(sptr, RPL_DATASTR, " ");
370 - send_reply(sptr, RPL_DATASTR, "Downlinks::");
371 - for (slink = cli_serv(acptr)->down; slink; slink = slink->next) {
372 - ircd_snprintf(0, outbuf, sizeof(outbuf), "[%d] - %s%s", ++dlinkc,
373 - IsBurst(slink->value.cptr) ? "*" : IsBurstAck(slink->value.cptr) ? "!" : IsService(slink->value.cptr) ? "=" : IsHub(slink->value.cptr) ? "+" : " ",
374 - cli_name(slink->value.cptr));
375 - send_reply(sptr, RPL_DATASTR, outbuf);
377 + send_reply(sptr, RPL_DATASTR, ": ");
378 + send_reply(sptr, RPL_DATASTR, ":Downlinks::");
379 + for (slink = cli_serv(acptr)->down; slink; slink = slink->next)
380 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":[%d] - %s%s",
382 + IsBurst(slink->value.cptr) ? "*" :
383 + (IsBurstAck(slink->value.cptr) ? "!" :
384 + (IsService(slink->value.cptr) ? "=" :
385 + (IsHub(slink->value.cptr) ? "+" : " "))),
386 + cli_name(slink->value.cptr));
389 - send_reply(sptr, RPL_DATASTR, "<none>");
390 + send_reply(sptr, RPL_DATASTR, ":<none>");
393 /* Send 'END OF CHECK' message */
395 struct Channel *chptr;
396 struct Membership *lp;
397 int count = 0, found = 0;
398 - char outbuf[BUFSIZE];
399 char targhost[NICKLEN + USERLEN + HOSTLEN + 3], curhost[NICKLEN + USERLEN + HOSTLEN + 3];
400 char hoststr[NICKLEN + USERLEN + HOSTLEN + 3];
401 char nickm[NICKLEN + 1], userm[USERLEN + 1], hostm[HOSTLEN + 1];
405 if(count >= 500) { /* sanity stuff */
406 - ircd_snprintf(0, outbuf, sizeof(outbuf), "More than %d results, truncating...", count);
407 - send_reply(sptr, RPL_DATASTR, outbuf);
408 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":More than %d results, truncating...", count);
412 @@ -718,37 +681,43 @@
413 /* Show header if we've found at least 1 record */
416 - send_reply(sptr, RPL_DATASTR, " ");
417 + send_reply(sptr, RPL_DATASTR, ": ");
418 send_reply(sptr, RPL_CHKHEAD, "host", targhost);
420 - send_reply(sptr, RPL_DATASTR, " ");
421 + send_reply(sptr, RPL_DATASTR, ": ");
422 if (flags & CHECK_SHOWMORE)
423 - ircd_snprintf(0, outbuf, sizeof(outbuf), "No. %s nick user@host [IP] (usermodes) :realname", (flags & CHECK_CLONES) ? "[clients]" : "");
424 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":No. %s nick user@host [IP] (usermodes) :realname",
425 + (flags & CHECK_CLONES) ? "[clients]" : "");
427 - ircd_snprintf(0, outbuf, sizeof(outbuf), "%s %-*s%-*s%s", "No.", (NICKLEN + 2), "Nick",
428 - (USERLEN + 2), "User", "Host");
429 - send_reply(sptr, RPL_DATASTR, outbuf);
430 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":%s %-*s%-*s%s", "No.",
431 + (NICKLEN + 2), "Nick", (USERLEN + 2), "User", "Host");
434 if (flags & CHECK_SHOWMORE) {
435 /* show more information */
436 umodes = umode_str(acptr, UMODE_AND_ACCOUNT_SHORT);
437 - ircd_snprintf(0, outbuf, sizeof(outbuf), "%-4d ", (count+1));
438 if (flags & CHECK_CLONES)
439 - ircd_snprintf(0, outbuf, sizeof(outbuf), "%s[%+3hu] ", outbuf, IPcheck_nr(acptr));
440 - ircd_snprintf(0, outbuf, sizeof(outbuf), "%s%s %s@%s [%s] (%s%s) :%s", outbuf,
442 - cli_user(acptr)->realusername, cli_user(acptr)->realhost,
443 - ircd_ntoa(&(cli_ip(acptr))),
444 - *umodes ? "+" : "<none>", umodes,
445 - (flags & CHECK_SHOWSERVER) ? cli_name(cli_user(acptr)->server) : cli_info(acptr));
447 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":%-4d [%+3hu] %s %s@%s [%s] (+%s) :%s",
451 + cli_user(acptr)->realusername, cli_user(acptr)->realhost,
452 + ircd_ntoa(&(cli_ip(acptr))),
454 + (flags & CHECK_SHOWSERVER) ? cli_name(cli_user(acptr)->server) : cli_info(acptr));
456 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":%-4d %s %s@%s [%s] (+%s) :%s",
459 + cli_user(acptr)->realusername, cli_user(acptr)->realhost,
460 + ircd_ntoa(&(cli_ip(acptr))),
462 + (flags & CHECK_SHOWSERVER) ? cli_name(cli_user(acptr)->server) : cli_info(acptr));
465 - ircd_snprintf(0, outbuf, sizeof(outbuf), "%-4d %-*s%-*s%s", (count+1), (NICKLEN + 2),
466 - acptr->cli_name, (USERLEN + 2), cli_user(acptr)->realusername,
467 - (flags & CHECK_SHOWIPS) ? ircd_ntoa(&(cli_ip(acptr))) : cli_user(acptr)->realhost);
469 - send_reply(sptr, RPL_DATASTR, outbuf);
470 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":%-4d %-*s%-*s%s",
471 + (count+1), (NICKLEN + 2), acptr->cli_name, (USERLEN + 2), cli_user(acptr)->realusername,
472 + (flags & CHECK_SHOWIPS) ? ircd_ntoa(&(cli_ip(acptr))) : cli_user(acptr)->realhost);
474 /* Show channel output (if applicable) - the 50 channel limit sanity check
475 * is specifically to prevent coredumping when someone lamely tries to /check
476 @@ -757,17 +726,17 @@
477 if (flags & CHECK_CHECKCHAN) {
478 if (cli_user(acptr)->joined > 0 && cli_user(acptr)->joined <= 50) {
479 char chntext[BUFSIZE];
480 - int len = strlen(" on channels: ");
481 + int len = strlen(": on channels: ");
482 int mlen = strlen(me.cli_name) + len + strlen(sptr->cli_name);
485 - strcpy(chntext, " on channels: ");
486 + strcpy(chntext, ": on channels: ");
487 for (lp = cli_user(acptr)->channel; lp; lp = lp->next_channel) {
489 if (len + strlen(chptr->chname) + mlen > BUFSIZE - 5) {
490 send_reply(sptr, RPL_DATASTR, chntext);
492 - strcpy(chntext, " on channels: ");
493 + strcpy(chntext, ": on channels: ");
494 len = strlen(chntext);
498 if (chntext[0] != '\0')
499 send_reply(sptr, RPL_DATASTR, chntext);
501 - send_reply(sptr, RPL_DATASTR, " ");
502 + send_reply(sptr, RPL_DATASTR, ": ");
510 - send_reply(sptr, RPL_DATASTR, " ");
512 - ircd_snprintf(0, outbuf, sizeof(outbuf), "Matching records found:: %d", count);
513 - send_reply(sptr, RPL_DATASTR, outbuf);
515 + send_reply(sptr, RPL_DATASTR, ": ");
516 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ":Matching records found:: %d", count);
517 send_reply(sptr, RPL_ENDOFCHECK, " ");
520 diff -r a698927b198f ircd/s_err.c
527 - { RPL_DATASTR, ":%s", "290" },
528 + { RPL_DATASTR, "%s", "290" },
530 { RPL_ENDOFCHECK, ":%s", "291" },