# HG changeset patch # User Matthew Wild # Date 1223232505 -3600 # Node ID ceb7a55676a40855a78c8f7fd9d57696612558c9 # Parent 5633602072924a13b3f99ca3b1a6d6873d70692c Beginnings of real stanza routing diff -r 563360207292 -r ceb7a55676a4 core/stanza_router.lua --- 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)