diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-11-04 19:18:32 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-11-04 19:18:32 +0500 |
commit | 1337bc1996210aef2918430d32468222ffdab68f (patch) | |
tree | 6e93aab1c66f1049bc24930e27642f1d7c197fc8 /plugins/mod_proxy65.lua | |
parent | 56f793583c675061427c22dff8d349aae6d57901 (diff) | |
download | prosody-1337bc1996210aef2918430d32468222ffdab68f.tar.gz prosody-1337bc1996210aef2918430d32468222ffdab68f.zip |
mod_proxy65: Use "iq/host" event for hooking stanzas instead of the component stanza handler.
Diffstat (limited to 'plugins/mod_proxy65.lua')
-rw-r--r-- | plugins/mod_proxy65.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua index 61359444..02b18ec1 100644 --- a/plugins/mod_proxy65.lua +++ b/plugins/mod_proxy65.lua @@ -207,7 +207,8 @@ local function set_activation(stanza) return reply, from, to, sid; end -function handle_to_domain(origin, stanza) +function handle_to_domain(event) + local origin, stanza = event.origin, event.stanza; local to_node, to_host, to_resource = jid_split(stanza.attr.to); if to_node == nil then local type = stanza.attr.type; @@ -256,6 +257,7 @@ function handle_to_domain(origin, stanza) end return; end +module:hook("iq/host", handle_to_domain); if not connlisteners.register(module.host .. ':proxy65', connlistener) then module:log("error", "mod_proxy65: Could not establish a connection listener. Check your configuration please."); @@ -263,4 +265,4 @@ if not connlisteners.register(module.host .. ':proxy65', connlistener) then end connlisteners.start(module.host .. ':proxy65'); -component = componentmanager.register_component(host, handle_to_domain); +component = componentmanager.register_component(host, function() end); |