diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-11-27 03:12:12 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-11-27 03:12:12 +0000 |
commit | a153b3c26704686bf9a3f2255d9aeb3c5f6aa2b1 (patch) | |
tree | d156f4bd25ecad253efb6417bf04bf93b9a5e637 /core/stanza_router.lua | |
parent | d70ee791d524173cd0c203f8c9fbfabeb5fd9816 (diff) | |
download | prosody-a153b3c26704686bf9a3f2255d9aeb3c5f6aa2b1.tar.gz prosody-a153b3c26704686bf9a3f2255d9aeb3c5f6aa2b1.zip |
Bumper commit for the new modulemanager API \o/ Updates all the modules, though some more changes may be in store.
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r-- | core/stanza_router.lua | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 2505fca3..308ae2f4 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -1,10 +1,4 @@ --- The code in this file should be self-explanatory, though the logic is horrible --- for more info on that, see doc/stanza_routing.txt, which attempts to condense --- the rules from the RFCs (mainly 3921) - -require "core.servermanager" - local log = require "util.logger".init("stanzarouter") local st = require "util.stanza"; @@ -82,7 +76,7 @@ function core_process_stanza(origin, stanza) elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server core_handle_stanza(origin, stanza); elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then - modules_handle_stanza(origin, stanza); + modules_handle_stanza(host or origin.host or origin.to_host, 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[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource @@ -105,7 +99,7 @@ end -- that is, they are handled by this server function core_handle_stanza(origin, stanza) -- Handlers - if modules_handle_stanza(origin, stanza) then return; end + if modules_handle_stanza(stanza.attr.to or origin.host, origin, stanza) then return; end if origin.type == "c2s" or origin.type == "c2s_unauthed" then local session = origin; |