diff options
author | Daniel Vassdal <shutter@canternet.org> | 2013-11-12 08:28:40 -0800 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-11-12 18:31:34 +0100 |
commit | 457c4f211f055b54031d8c8822bddc4d78af91c3 (patch) | |
tree | 53fc12576d0cf5e9eee975c75c3ee0471f08c98b /src/commands/cmd_modules.cpp | |
parent | e81860311e448867c1c35b89734afb5ea672019c (diff) |
Fix remote /MODULES bug
Diffstat (limited to 'src/commands/cmd_modules.cpp')
-rw-r--r-- | src/commands/cmd_modules.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commands/cmd_modules.cpp b/src/commands/cmd_modules.cpp index b8a1805b0..e21df9b08 100644 --- a/src/commands/cmd_modules.cpp +++ b/src/commands/cmd_modules.cpp @@ -49,8 +49,11 @@ class CommandModules : public Command /** Handle /MODULES */ -CmdResult CommandModules::Handle (const std::vector<std::string>&, User *user) +CmdResult CommandModules::Handle (const std::vector<std::string>& parameters, User *user) { + if (parameters.size() >= 1 && parameters[0] != ServerInstance->Config->ServerName) + return CMD_SUCCESS; + std::vector<std::string> module_names = ServerInstance->Modules->GetAllModuleNames(0); for (unsigned int i = 0; i < module_names.size(); i++) @@ -58,7 +61,7 @@ CmdResult CommandModules::Handle (const std::vector<std::string>&, User *user) Module* m = ServerInstance->Modules->Find(module_names[i]); Version V = m->GetVersion(); - if (user->HasPrivPermission("servers/auspex")) + if (IS_LOCAL(user) && user->HasPrivPermission("servers/auspex")) { std::string flags("SvcC"); int pos = 0; |