core/modulemanager.lua

changeset 1993
09621f8d0366
parent 1988
a6e7fe0fc3dd
child 1994
9cc9b096c8f5
--- 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);

mercurial