Changeset

1168:dd523bfc9ea9

Dropped support for resource based components
author Waqas Hussain <waqas20@gmail.com>
date Sat, 16 May 2009 02:07:27 +0500
parents 1167:5620ea24be94
children 1169:fdc68aec1d49
files core/componentmanager.lua core/stanza_router.lua
diffstat 2 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/core/componentmanager.lua	Sat May 16 01:41:45 2009 +0500
+++ b/core/componentmanager.lua	Sat May 16 02:07:27 2009 +0500
@@ -67,7 +67,6 @@
 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
--- a/core/stanza_router.lua	Sat May 16 01:41:45 2009 +0500
+++ b/core/stanza_router.lua	Sat May 16 02:07:27 2009 +0500
@@ -116,8 +116,6 @@
 			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 @@
 	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);