Software /
code /
prosody
Diff
core/componentmanager.lua @ 3586:78ed7ad330ab
componentmanager, stanza_router: Get rid of componentmanager.handle_stanza().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 10 Nov 2010 02:51:36 +0500 |
parent | 3584:5d880c365dd4 |
child | 3587:d94aacb2771a |
line wrap: on
line diff
--- a/core/componentmanager.lua Wed Nov 10 02:50:35 2010 +0500 +++ b/core/componentmanager.lua Wed Nov 10 02:51:36 2010 +0500 @@ -57,22 +57,6 @@ prosody.events.add_handler("server-starting", load_enabled_components); end -function handle_stanza(origin, stanza) - local node, host = jid_split(stanza.attr.to); - local component = nil; - if host then - if node then component = components[node.."@"..host]; end -- hack to allow hooking node@server - if not component then component = components[host]; end - end - if component then - log("debug", "%s stanza being handled by component: %s", stanza.name, host); - component(origin, stanza, hosts[host]); - else - log("error", "Component manager recieved a stanza for a non-existing component: "..tostring(stanza)); - default_component_handler(origin, stanza); - end -end - function create_component(host, component, events) -- TODO check for host well-formedness return { type = "component", host = host, connected = true, s2sout = {},