Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-05-04 02:55:48 UTC
Modified files:
ChangeLog ircd/s_stats.c
Log message:
Fix a crash in /stats i <server> <mask>.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.620 ircu2.10/ChangeLog:1.621
--- ircu2.10/ChangeLog:1.620 Mon May 2 20:47:40 2005
+++ ircu2.10/ChangeLog Tue May 3 19:55:37 2005
@@ -1,3 +1,9 @@
+2005-05-03 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/s_stats.c (stats_access): Update to use new CONF_CLIENT
+ fields, fixing crash found by nighty.
+
+
2005-05-02 Michael Poole <[EMAIL PROTECTED]>
* include/numeric.h (ERR_UPASS_SAME_APASS): New error message when
Index: ircu2.10/ircd/s_stats.c
diff -u ircu2.10/ircd/s_stats.c:1.38 ircu2.10/ircd/s_stats.c:1.39
--- ircu2.10/ircd/s_stats.c:1.38 Sat Apr 16 19:57:57 2005
+++ ircu2.10/ircd/s_stats.c Tue May 3 19:55:38 2005
@@ -62,7 +62,7 @@
/** @file
* @brief Report configuration lines and other statistics from this
* server.
- * @version $Id: s_stats.c,v 1.38 2005/04/17 02:57:57 entrope Exp $
+ * @version $Id: s_stats.c,v 1.39 2005/05/04 02:55:38 entrope Exp $
*
* Note: The info is reported in the order the server uses
* it--not reversed as in ircd.conf!
@@ -172,12 +172,15 @@
{
if (aconf->status != CONF_CLIENT)
continue;
- if ((!wilds && (!match(aconf->host, param) ||
- !match(aconf->name, param))) ||
- (wilds && (!mmatch(param, aconf->host) ||
- !mmatch(param, aconf->name))))
+ if (wilds ? ((aconf->host && !mmatch(aconf->host, param))
+ || (aconf->name && !mmatch(aconf->name, param)))
+ : ((aconf->host && !match(param, aconf->host))
+ || (aconf->name && !match(param, aconf->name))))
{
- send_reply(to, RPL_STATSILINE, 'I', aconf->host, aconf->name,
+ send_reply(to, RPL_STATSILINE,
+ (aconf->host ? aconf->host : "*"), aconf->maximum,
+ (aconf->name && aconf->name[0] == ':' ? "0":""),
+ aconf->name ? aconf->name : "*",
aconf->address.port, get_conf_class(aconf));
if (--count == 0)
break;
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches