Diff

plugins/mod_proxy65.lua @ 5342:4c8c8285bf88

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Sun, 10 Mar 2013 11:29:47 +0000
parent 5336:eeb24f1e2c84
child 5375:b31ab26f9997
line wrap: on
line diff
--- a/plugins/mod_proxy65.lua	Sun Feb 03 15:52:27 2013 +0100
+++ b/plugins/mod_proxy65.lua	Sun Mar 10 11:29:47 2013 +0000
@@ -106,16 +106,20 @@
 	
 	module:hook("iq-get/host/http://jabber.org/protocol/disco#info:query", function(event)
 		local origin, stanza = event.origin, event.stanza;
-		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;
+		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;
-		origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#items"));
-		return true;
+		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)