# HG changeset patch
# User Waqas Hussain <waqas20@gmail.com>
# Date 1291318674 -18000
# Node ID 1dc56141ffda425e0e1f075ba9bfe607b5514fc1
# Parent  459c136305c3503de9afa54b12dac2fcaa5ce9c7
mod_disco: Don't add caps hash to stream features on unauthenticated connections.

diff -r 459c136305c3 -r 1dc56141ffda plugins/mod_disco.lua
--- a/plugins/mod_disco.lua	Fri Dec 03 00:29:44 2010 +0500
+++ b/plugins/mod_disco.lua	Fri Dec 03 00:37:54 2010 +0500
@@ -115,7 +115,9 @@
 
 -- Handle caps stream feature
 module:hook("stream-features", function (event)
-	event.features:add_child(get_server_caps_feature());
+	if event.origin.type == "c2s" then
+		event.features:add_child(get_server_caps_feature());
+	end
 end);
 
 -- Handle disco requests to user accounts