core/stanza_router.lua

changeset 68
ceb7a55676a4
parent 66
018705d57f09
child 71
fbb4ef1da82e
--- a/core/stanza_router.lua	Sun Oct 05 19:16:32 2008 +0100
+++ b/core/stanza_router.lua	Sun Oct 05 19:48:25 2008 +0100
@@ -41,7 +41,21 @@
 
 function core_route_stanza(origin, stanza)
 	-- Hooks
+	--- ...later
+	
 	-- Deliver
+	local node, host, resource = jid_split(stanza.attr.to);
+	local host_session = hosts[host]
+	if host_session and host_session.type == "local" then
+		-- Local host
+	else
+		-- Remote host
+		if host_session then
+			-- Send to session
+		else
+			-- Need to establish the connection
+		end
+	end
 end
 
 function handle_stanza_nodest(stanza)

mercurial