From 80abf1ed3ef868b1cad85785b2386f5cbd818ba4 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 19 Jan 2010 05:08:14 +0000 Subject: Remove overrides for ADMIN, STATS, TIME git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12302 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_stats.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/commands/cmd_stats.cpp') diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 6180709a7..55279627c 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -44,23 +44,23 @@ class CommandStats : public Command * @return A value from CmdResult to indicate command success or failure. */ CmdResult Handle(const std::vector& parameters, User *user); + RouteDescriptor GetRouting(User* user, const std::vector& parameters) + { + if (parameters.size() > 1) + return ROUTE_UNICAST(parameters[1]); + return ROUTE_LOCALONLY; + } }; CmdResult CommandStats::Handle (const std::vector& parameters, User *user) { - if (IS_LOCAL(user)) - { - string_list values; - if (parameters[0].empty()) - { - user->WriteNumeric(ERR_NEEDMOREPARAMS, "%s STATS :Not enough parameters.", user->nick.c_str()); - return CMD_FAILURE; - } - char search = parameters[0][0]; - ServerInstance->DoStats(search, user, values); - for (size_t i = 0; i < values.size(); i++) - user->Write(":%s", values[i].c_str()); - } + if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName) + return CMD_SUCCESS; + string_list values; + char search = parameters[0][0]; + ServerInstance->DoStats(search, user, values); + for (size_t i = 0; i < values.size(); i++) + user->SendText(":%s", values[i].c_str()); return CMD_SUCCESS; } -- cgit v1.2.3