diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-18 03:15:33 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-18 03:15:33 +0500 |
commit | 4b7031b383c5eb046a3f48fc722a2d5430a82d24 (patch) | |
tree | 497b6f64414df02ab57fc18076951484029242da /core | |
parent | f0ea8af0774e647581c8a3357bc66b29fcee3d06 (diff) | |
download | prosody-4b7031b383c5eb046a3f48fc722a2d5430a82d24.tar.gz prosody-4b7031b383c5eb046a3f48fc722a2d5430a82d24.zip |
modulemanager: Use componentmanager to create new components.
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index f703889f..dea6860b 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -128,7 +128,12 @@ function load(host, module_name, config) local pluginenv = setmetatable({ module = api_instance }, { __index = _G }); setfenv(mod, pluginenv); - if not hosts[host] then hosts[host] = { type = "component", host = host, connected = false, s2sout = {} }; end + if not hosts[host] then + local create_component = _G.require "core.componentmanager".create_component; + hosts[host] = create_component(host); + hosts[host].connected = false; + log("debug", "Created new component: %s", host); + end hosts[host].modules = modulemap[host]; local success, ret = pcall(mod); |