stanza_router: Remove even more old routing code

Thu, 25 Jun 2009 08:13:21 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 25 Jun 2009 08:13:21 +0500
changeset 1410
b71a9e29adc3
parent 1409
e34cbd9baf8b
child 1411
b12096b69f36

stanza_router: Remove even more old routing code

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Thu Jun 25 08:11:05 2009 +0500
+++ b/core/stanza_router.lua	Thu Jun 25 08:13:21 2009 +0500
@@ -175,10 +175,6 @@
 end
 
 function core_route_stanza(origin, stanza)
-	-- Hooks
-	--- ...later
-
-	-- Deliver
 	local to = stanza.attr.to;
 	local node, host, resource = jid_split(to);
 	local to_bare = node and (node.."@"..host) or host; -- bare JID
@@ -190,14 +186,6 @@
 	origin = origin or hosts[from_host];
 	if not origin then return false; end
 	
-	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);
-	end
-
-	if stanza.name == "presence" and (stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error") then resource = nil; end
-
 	local host_session = hosts[host]
 	if host_session and host_session.type == "local" then
 		-- old stanza routing code removed

mercurial