# HG changeset patch # User Waqas Hussain # Date 1289405974 -18000 # Node ID 07c1c3eaf0c45ab62dd1f3c6fa7c126f0f8fc32d # Parent 27c652363874ab1fbef02124ba76594f3a7f7aa4 mod_tcpproxy: Updated to use events instead of componentmanager. diff -r 27c652363874 -r 07c1c3eaf0c4 mod_tcpproxy/mod_tcpproxy.lua --- a/mod_tcpproxy/mod_tcpproxy.lua Wed Nov 10 21:18:21 2010 +0500 +++ b/mod_tcpproxy/mod_tcpproxy.lua Wed Nov 10 21:19:34 2010 +0500 @@ -104,4 +104,18 @@ end end -require "core.componentmanager".register_component(host, proxy_component); +local function stanza_handler(event) + proxy_component(event.origin, event.stanza); + return true; +end +module:hook("iq/bare", stanza_handler); +module:hook("message/bare", stanza_handler); +module:hook("presence/bare", stanza_handler); +module:hook("iq/full", stanza_handler); +module:hook("message/full", stanza_handler); +module:hook("presence/full", stanza_handler); +module:hook("iq/host", stanza_handler); +module:hook("message/host", stanza_handler); +module:hook("presence/host", stanza_handler); + +require "core.componentmanager".register_component(host, function() end); -- COMPAT Prosody 0.7