diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-19 05:08:14 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-19 05:08:14 +0000 |
commit | 80abf1ed3ef868b1cad85785b2386f5cbd818ba4 (patch) | |
tree | b1a5ef2563d5c520aa8a34fb2a28b91a524b6bd7 /src/commands/cmd_stats.cpp | |
parent | aeded4708c515bcc255b2947e67f076855fead14 (diff) |
Remove overrides for ADMIN, STATS, TIME
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12302 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_stats.cpp')
-rw-r--r-- | src/commands/cmd_stats.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
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<std::string>& parameters, User *user); + RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) + { + if (parameters.size() > 1) + return ROUTE_UNICAST(parameters[1]); + return ROUTE_LOCALONLY; + } }; CmdResult CommandStats::Handle (const std::vector<std::string>& 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; } |