# HG changeset patch # User Waqas Hussain # Date 1255817733 -18000 # Node ID 09621f8d03660878962322ee6603ee3feb6b006b # Parent bbaba17537a9a092d14aab4b0f7b3c63930c008a modulemanager: Use componentmanager to create new components. diff -r bbaba17537a9 -r 09621f8d0366 core/modulemanager.lua --- a/core/modulemanager.lua Sun Oct 18 03:08:41 2009 +0500 +++ b/core/modulemanager.lua Sun Oct 18 03:15:33 2009 +0500 @@ -128,7 +128,12 @@ 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);