Changeset

6021:f8c17af769d9

mod_proxy65: Use mod_disco
author Florian Zeitz <florob@babelmonkeys.de>
date Wed, 19 Feb 2014 20:13:35 +0100
parents 6019:e9147a16059d
children 6022:b5771e83a0ee 6027:8c69cea8a1bf
files plugins/mod_proxy65.lua
diffstat 1 files changed, 1 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_proxy65.lua	Wed Feb 12 13:45:16 2014 +0100
+++ b/plugins/mod_proxy65.lua	Wed Feb 19 20:13:35 2014 +0100
@@ -101,27 +101,10 @@
 		module:log("warn", "proxy65_port is deprecated, please put proxy65_ports = { %d } into the global section instead", legacy_config);
 	end
 
+	module:depends("disco");
 	module:add_identity("proxy", "bytestreams", name);
 	module:add_feature("http://jabber.org/protocol/bytestreams");
 
-	module:hook("iq-get/host/http://jabber.org/protocol/disco#info:query", function(event)
-		local origin, stanza = event.origin, event.stanza;
-		if not stanza.tags[1].attr.node then
-			origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#info")
-				:tag("identity", {category='proxy', type='bytestreams', name=name}):up()
-				:tag("feature", {var="http://jabber.org/protocol/bytestreams"}) );
-			return true;
-		end
-	end, -1);
-
-	module:hook("iq-get/host/http://jabber.org/protocol/disco#items:query", function(event)
-		local origin, stanza = event.origin, event.stanza;
-		if not stanza.tags[1].attr.node then
-			origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#items"));
-			return true;
-		end
-	end, -1);
-
 	module:hook("iq-get/host/http://jabber.org/protocol/bytestreams:query", function(event)
 		local origin, stanza = event.origin, event.stanza;