X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fcomponentmanager.lua;h=a63cfd7abee186cb8513c9ccd93432e9efe89735;hb=13ecd9088e5ee2364f89af93f711aad4bb9a23b2;hp=d7791c4bc072996bcd58675017220e0a24ab7e3a;hpb=dd01eab72e892dc74540c5d2fe197dd646fb8b74;p=prosody.git diff --git a/core/componentmanager.lua b/core/componentmanager.lua index d7791c4b..a63cfd7a 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -1,4 +1,4 @@ --- Prosody IM v0.1 +-- Prosody IM v0.2 -- Copyright (C) 2008 Matthew Wild -- Copyright (C) 2008 Waqas Hussain -- @@ -20,7 +20,8 @@ -local log = require "util.logger".init("componentmanager") +local log = require "util.logger".init("componentmanager"); +local module_load = require "core.modulemanager".load; local jid_split = require "util.jid".split; local hosts = hosts; @@ -45,7 +46,9 @@ function register_component(host, component) if not hosts[host] then -- TODO check for host well-formedness components[host] = component; - hosts[host] = {type = "component", host = host, connected = true, s2sout = {} }; + hosts[host] = { type = "component", host = host, connected = true, s2sout = {} }; + -- FIXME only load for a.b.c if b.c has dialback, and/or check in config + module_load(host, "dialback"); log("debug", "component added: "..host); return hosts[host]; else