From 4b7031b383c5eb046a3f48fc722a2d5430a82d24 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 18 Oct 2009 03:15:33 +0500 Subject: modulemanager: Use componentmanager to create new components. --- core/modulemanager.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core') 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); -- cgit v1.2.3