diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-11-10 19:57:35 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-11-10 19:57:35 +0500 |
commit | d1706d1cb578ea661f52564d271968b76b088af1 (patch) | |
tree | b6cd96d7d3b4932d888e45f1cd08827532901552 /core/componentmanager.lua | |
parent | 24245b60d112dcee347bf7c073b4715782ca0c23 (diff) | |
download | prosody-d1706d1cb578ea661f52564d271968b76b088af1.tar.gz prosody-d1706d1cb578ea661f52564d271968b76b088af1.zip |
hostmanager, componentmanager: hostmanager now handles component initialization at server start, not componentmanager.
Diffstat (limited to 'core/componentmanager.lua')
-rw-r--r-- | core/componentmanager.lua | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua index 39a5f7ef..fceddcc5 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -34,28 +34,6 @@ local function default_component_handler(origin, stanza) end end -function load_enabled_components(config) - local defined_hosts = config or configmanager.getconfig(); - - for host, host_config in pairs(defined_hosts) do - if host ~= "*" and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then - hosts[host] = create_component(host); - components[host] = default_component_handler; - local ok, err = modulemanager.load(host, host_config.core.component_module); - if not ok then - log("error", "Error loading %s component %s: %s", tostring(host_config.core.component_module), tostring(host), tostring(err)); - else - fire_event("component-activated", host, host_config); - log("debug", "Activated %s component: %s", host_config.core.component_module, host); - end - end - end -end - -if prosody and prosody.events then - prosody.events.add_handler("server-starting", load_enabled_components); -end - function create_component(host, component, events) -- TODO check for host well-formedness return { type = "component", host = host, s2sout = {}, |