From dffeaa0b3b38209b0da05c06a941edf6a93da1d6 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Tue, 27 Mar 2007 03:44:41 +0000 Subject: [PATCH] Only check /stats subcommands with STAT_FLAG_LOCONLY on the hunted server. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1792 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 5 +++++ ircd/m_stats.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 97bc410..3166424 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-26 Michael Poole + + * 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 * ircd/s_auth.c (iauth_parse): Check for missing arguments when diff --git a/ircd/m_stats.c b/ircd/m_stats.c index 0ba58c4..c173e83 100644 --- a/ircd/m_stats.c +++ b/ircd/m_stats.c @@ -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 */ -- 2.20.1