hostmanager: Don't prevent host_session.send() from routing errors or iq results...
[prosody.git] / core / modulemanager.lua
index 2ad2fc1761f44d822e5879ae1755d2c7ab917dc8..92372ac32f2b62f232addb683538d188cfaaeb03 100644 (file)
@@ -29,15 +29,15 @@ pcall = function(f, ...)
        return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end);
 end
 
-local autoload_modules = {"presence", "message", "iq", "offline", "c2s", "s2s"};
-local component_inheritable_modules = {"tls", "dialback", "iq", "s2s"};
+local autoload_modules = {prosody.platform, "presence", "message", "iq", "offline", "c2s", "s2s", "s2s_auth_certs"};
+local component_inheritable_modules = {"tls", "saslauth", "dialback", "iq", "s2s"};
 
 -- We need this to let modules access the real global namespace
 local _G = _G;
 
 module "modulemanager"
 
-local api = _G.require "core.moduleapi"; -- Module API container
+local api = _G.require "core.moduleapi".init(_M); -- Module API container
 
 -- [host] = { [module] = module_env }
 local modulemap = { ["*"] = {} };
@@ -123,7 +123,7 @@ local function do_load_module(host, module_name, state)
        end
 
        if modulemap[host][module_name] then
-               log("warn", "%s is already loaded for %s, so not loading again", module_name, host);
+               log("debug", "%s is already loaded for %s, so not loading again", module_name, host);
                return nil, "module-already-loaded";
        elseif modulemap["*"][module_name] then
                local mod = modulemap["*"][module_name];