From 63de1444c34fe6f496046909d2a85d114a148c75 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 5 Oct 2008 19:48:25 +0100 Subject: Beginnings of real stanza routing --- core/stanza_router.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'core') diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 489bb96d..10335fa3 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -41,7 +41,21 @@ end 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) -- cgit v1.2.3