From fa5531fe41a1998d31360a4c28a72984247b0493 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 4 Nov 2008 22:50:32 +0000 Subject: Re-applying my changes to componentmanager. Sigh. --- core/componentmanager.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/componentmanager.lua b/core/componentmanager.lua index 18bf5c02..38718882 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -15,7 +15,7 @@ function handle_stanza(origin, stanza) if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource if component then log("debug", "stanza being handled by component: "..host); - component(origin, stanza); + component(origin, stanza, hosts[host]); else log("error", "Component manager recieved a stanza for a non-existing component: " .. stanza.attr.to); end @@ -25,11 +25,11 @@ function register_component(host, component) if not hosts[host] then -- TODO check for host well-formedness components[host] = component; - hosts[host] = {type = "component", connected = true}; + hosts[host] = {type = "component", host = host, connected = true}; log("debug", "component added: "..host); else log("error", "Attempt to set component for existing host: "..host); end end -return _M; \ No newline at end of file +return _M; -- cgit v1.2.3