componentmanager: Use create_component for, er, creating components

Wed, 30 Sep 2009 11:02:31 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 30 Sep 2009 11:02:31 +0100
changeset 1849
5529d3c8eee7
parent 1848
0033359aeb70
child 1850
8f1871c1d456

componentmanager: Use create_component for, er, creating components

core/componentmanager.lua file | annotate | diff | comparison | revisions
--- 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

mercurial