From 1337bc1996210aef2918430d32468222ffdab68f Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Thu, 4 Nov 2010 19:18:32 +0500 Subject: mod_proxy65: Use "iq/host" event for hooking stanzas instead of the component stanza handler. --- plugins/mod_proxy65.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/mod_proxy65.lua') 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); -- cgit v1.2.3