Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-02-19 17:15:49 UTC
Modified files:
ircd/s_stats.c ircd/s_err.c ChangeLog
Log message:
Put 0 before addresses like ::1 in "STATS c" and "STATS i".
Change "STATS o" to look more like in .11.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.552 ircu2.10/ChangeLog:1.553
--- ircu2.10/ChangeLog:1.552 Fri Feb 18 21:30:37 2005
+++ ircu2.10/ChangeLog Sat Feb 19 09:15:38 2005
@@ -1,3 +1,13 @@
+2005-02-19 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/s_err.c (RPL_STATSCLINE): Add format field to prefix IPv6
+ addresses starting with ':'.
+ (RPL_STATSILINE): Likewise.
+ (RPL_STATSOLINE): Add format field for username.
+
+ * ircd/s_stats.c (stats_configured_links): Pass the appropriate
+ argument for the RPL_STATSxLINE changes.
+
2005-02-18 Michael Poole <[EMAIL PROTECTED]>
* ircd/IPcheck.c (ip_registry_find): Use canonical form of IP
Index: ircu2.10/ircd/s_err.c
diff -u ircu2.10/ircd/s_err.c:1.62 ircu2.10/ircd/s_err.c:1.63
--- ircu2.10/ircd/s_err.c:1.62 Sat Dec 18 08:26:27 2004
+++ ircu2.10/ircd/s_err.c Sat Feb 19 09:15:38 2005
@@ -18,7 +18,7 @@
*/
/** @file
* @brief Error handling support.
- * @version $Id: s_err.c,v 1.62 2004/12/18 16:26:27 klmitch Exp $
+ * @version $Id: s_err.c,v 1.63 2005/02/19 17:15:38 entrope Exp $
*/
#include "config.h"
@@ -458,11 +458,11 @@
/* 212 */
{ RPL_STATSCOMMANDS, "%s %u %u", "212" },
/* 213 */
- { RPL_STATSCLINE, "C %s %s %d %d %s %s", "213" },
+ { RPL_STATSCLINE, "C %s %s%s %d %d %s %s", "213" },
/* 214 */
{ 0 },
/* 215 */
- { RPL_STATSILINE, "I %s %d %s %d %s", "215" },
+ { RPL_STATSILINE, "I %s %d %s%s %d %s", "215" },
/* 216 */
{ RPL_STATSKLINE, "%c %s \"%s\" %s 0 0", "216" },
/* 217 */
@@ -518,7 +518,7 @@
/* 242 */
{ RPL_STATSUPTIME, ":Server Up %d days, %d:%02d:%02d", "242" },
/* 243 */
- { RPL_STATSOLINE, "O %s * %s %d %d", "243" },
+ { RPL_STATSOLINE, "O [EMAIL PROTECTED] * %s %s", "243" },
/* 244 */
{ 0 },
/* 245 */
Index: ircu2.10/ircd/s_stats.c
diff -u ircu2.10/ircd/s_stats.c:1.31 ircu2.10/ircd/s_stats.c:1.32
--- ircu2.10/ircd/s_stats.c:1.31 Fri Feb 18 18:36:01 2005
+++ ircu2.10/ircd/s_stats.c Sat Feb 19 09:15:37 2005
@@ -60,7 +60,7 @@
/** @file
* @brief Report configuration lines and other statistics from this
* server.
- * @version $Id: s_stats.c,v 1.31 2005/02/19 02:36:01 entrope Exp $
+ * @version $Id: s_stats.c,v 1.32 2005/02/19 17:15:37 entrope Exp $
*
* Note: The info is reported in the order the server uses
* it--not reversed as in ircd.conf!
@@ -87,7 +87,7 @@
struct ConfItem *tmp;
unsigned short int port;
int maximum;
- char *host, *pass, *name, *hub_limit;
+ char *host, *pass, *name, *username, *hub_limit;
for (tmp = GlobalConfList; tmp; tmp = tmp->next)
{
@@ -96,17 +96,18 @@
host = BadPtr(tmp->host) ? null : tmp->host;
pass = BadPtr(tmp->passwd) ? null : tmp->passwd;
name = BadPtr(tmp->name) ? null : tmp->name;
+ username = BadPtr(tmp->username) ? null : tmp->username;
hub_limit = BadPtr(tmp->hub_limit) ? null : tmp->hub_limit;
maximum = tmp->maximum;
port = tmp->address.port;
if (tmp->status & CONF_UWORLD)
send_reply(sptr, RPL_STATSULINE, host);
else if (tmp->status & CONF_SERVER)
- send_reply(sptr, RPL_STATSCLINE, name, host, port, maximum, hub_limit,
get_conf_class(tmp));
+ send_reply(sptr, RPL_STATSCLINE, name, (host[0] == ':' ? "0" : ""),
host, port, maximum, hub_limit, get_conf_class(tmp));
else if (tmp->status & CONF_CLIENT)
- send_reply(sptr, RPL_STATSILINE, host, maximum, name, port,
get_conf_class(tmp));
+ send_reply(sptr, RPL_STATSILINE, host, maximum, (name[0] == ':' ? "0"
: ""), name, port, get_conf_class(tmp));
else if (tmp->status & CONF_OPERATOR)
- send_reply(sptr, RPL_STATSOLINE, host, name, port, get_conf_class(tmp));
+ send_reply(sptr, RPL_STATSOLINE, username, host, name,
get_conf_class(tmp));
}
}
}
----------------------- End of diff -----------------------