Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-03-27 03:44:51 UTC

Modified files:
  Tag: u2_10_12_branch
     ircd/m_stats.c ChangeLog

Log message:

Only check /stats subcommands with STAT_FLAG_LOCONLY on the hunted server.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.170 ircu2.10/ChangeLog:1.710.2.171
--- ircu2.10/ChangeLog:1.710.2.170      Mon Mar 26 20:37:39 2007
+++ ircu2.10/ChangeLog  Mon Mar 26 20:44:41 2007
@@ -1,5 +1,10 @@
 2007-03-26  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/s_stats.c (m_stats): Move check for STAT_FLAG_LOCONLY (and
+       the assignment to "param") to the hunted server.
+
+2007-03-26  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/s_auth.c (iauth_parse): Check for missing arguments when
        parsing the iauth message.
 
Index: ircu2.10/ircd/m_stats.c
diff -u ircu2.10/ircd/m_stats.c:1.31.2.2 ircu2.10/ircd/m_stats.c:1.31.2.3
--- ircu2.10/ircd/m_stats.c:1.31.2.2    Tue May 30 19:43:00 2006
+++ ircu2.10/ircd/m_stats.c     Mon Mar 26 20:44:41 2007
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_stats.c,v 1.31.2.2 2006/05/31 02:43:00 entrope Exp $
+ * $Id: m_stats.c,v 1.31.2.3 2007/03/27 03:44:41 entrope Exp $
  */
 
 /*
@@ -140,6 +140,12 @@
        ((sd->sd_flags & STAT_FLAG_OPERFEAT) && feature_bool(sd->sd_control))))
     return send_reply(sptr, ERR_NOPRIVILEGES);
 
+  /* Ok, track down who's supposed to get this... */
+  if (hunt_server_cmd(sptr, CMD_STATS, cptr, feature_int(FEAT_HIS_REMOTE),
+                     param ? "%s %C :%s" : "%s :%C", 2, parc, parv) !=
+      HUNTED_ISME)
+    return 0; /* Someone else--cool :) */
+
   /* Check if they are a local user */
   if ((sd->sd_flags & STAT_FLAG_LOCONLY) && !MyUser(sptr))
     return send_reply(sptr, ERR_NOPRIVILEGES);
@@ -148,12 +154,6 @@
   if ((sd->sd_flags & STAT_FLAG_VARPARAM) && parc > 3 && !EmptyString(parv[3]))
     param = parv[3];
 
-  /* Ok, track down who's supposed to get this... */
-  if (hunt_server_cmd(sptr, CMD_STATS, cptr, feature_int(FEAT_HIS_REMOTE),
-                     param ? "%s %C :%s" : "%s :%C", 2, parc, parv) !=
-      HUNTED_ISME)
-    return 0; /* Someone else--cool :) */
-
   assert(sd->sd_func != 0);
 
   /* Ok, dispatch the stats function */
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to