+2005-02-19 Michael Poole <mdpoole@troilus.org>
+
+ * 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 <mdpoole@troilus.org>
* ircd/IPcheck.c (ip_registry_find): Use canonical form of IP
/* 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 */
/* 242 */
{ RPL_STATSUPTIME, ":Server Up %d days, %d:%02d:%02d", "242" },
/* 243 */
- { RPL_STATSOLINE, "O %s * %s %d %d", "243" },
+ { RPL_STATSOLINE, "O %s@%s * %s %s", "243" },
/* 244 */
{ 0 },
/* 245 */
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)
{
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));
}
}
}