Only check /stats subcommands with STAT_FLAG_LOCONLY on the hunted server.
authorMichael Poole <mdpoole@troilus.org>
Tue, 27 Mar 2007 03:44:41 +0000 (03:44 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 27 Mar 2007 03:44:41 +0000 (03:44 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1792 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_stats.c

index 97bc4105bdf371398d7a37bfaef36a8bba32dd84..3166424cd984d00d31373e8395a6d45feb2cd4f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-26  Michael Poole <mdpoole@troilus.org>
+
+       * 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 <mdpoole@troilus.org>
 
        * ircd/s_auth.c (iauth_parse): Check for missing arguments when
index 0ba58c42faeeb5ba30a714f427b525337a11d6e2..c173e833001dc5ffeb5d73c033c9ac262182b05e 100644 (file)
@@ -140,6 +140,12 @@ m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
        ((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 @@ m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   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 */