aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-05-16 02:07:27 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-05-16 02:07:27 +0500
commitd097fa5bf92373df1de2270c26491f983cd76137 (patch)
treea0031b2f51a50fe6fe84d82f582fcbe02cbecbcb /core
parent32b1d54a24d043bff7f21baaf357b76f40015837 (diff)
downloadprosody-d097fa5bf92373df1de2270c26491f983cd76137.tar.gz
prosody-d097fa5bf92373df1de2270c26491f983cd76137.zip
Dropped support for resource based components
Diffstat (limited to 'core')
-rw-r--r--core/componentmanager.lua1
-rw-r--r--core/stanza_router.lua6
2 files changed, 1 insertions, 6 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua
index d76b7849..d2a8d9f6 100644
--- a/core/componentmanager.lua
+++ b/core/componentmanager.lua
@@ -67,7 +67,6 @@ eventmanager.add_event_hook("server-starting", load_enabled_components);
function handle_stanza(origin, stanza)
local node, host = jid_split(stanza.attr.to);
local component = nil;
- if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource
if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server
if not component then component = components[host]; end
if component then
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 1640e0ed..2413b2cc 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -116,8 +116,6 @@ function core_process_stanza(origin, stanza)
modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza);
elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server
modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza);
- elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
- component_handle_stanza(origin, stanza);
elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
component_handle_stanza(origin, stanza);
elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
@@ -148,9 +146,7 @@ function core_route_stanza(origin, stanza)
origin = origin or hosts[from_host];
if not origin then return false; end
- if hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
- return component_handle_stanza(origin, stanza);
- elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
+ if hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
return component_handle_stanza(origin, stanza);
elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
return component_handle_stanza(origin, stanza);