Diff

core/componentmanager.lua @ 1849:5529d3c8eee7

componentmanager: Use create_component for, er, creating components
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 Sep 2009 11:02:31 +0100
parent 1523:841d61be198f
child 1850:8f1871c1d456
line wrap: on
line diff
--- a/core/componentmanager.lua	Wed Sep 30 11:01:21 2009 +0100
+++ b/core/componentmanager.lua	Wed Sep 30 11:02:31 2009 +0100
@@ -51,7 +51,8 @@
 		
 	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] = { type = "component", host = host, connected = false, s2sout = {}, events = events_new() };
+			hosts[host] = create_component(host);
+			hosts[host].connected = false;
 			components[host] = default_component_handler;
 			local ok, err = modulemanager.load(host, host_config.core.component_module);
 			if not ok then