# HG changeset patch # User Waqas Hussain # Date 1276435766 -18000 # Node ID 3371419eb0e138852540d45f67b418e576b25146 # Parent a8a4c87a4fbf39d71958ea39101b051a7b8d0232 MUC: Added disco#info features to advertise room's password protection (muc_passwordprotected or muc_unsecured, depending on whether a password is set). diff -r a8a4c87a4fbf -r 3371419eb0e1 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Jun 13 18:14:46 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 18:29:26 2010 +0500 @@ -206,7 +206,9 @@ function room_mt:get_disco_info(stanza) return st.reply(stanza):query("http://jabber.org/protocol/disco#info") :tag("identity", {category="conference", type="text"}):up() - :tag("feature", {var="http://jabber.org/protocol/muc"}); + :tag("feature", {var="http://jabber.org/protocol/muc"}):up() + :tag("feature", {var=self:get_password() and "muc_passwordprotected" or "muc_unsecured"}):up() + ; end function room_mt:get_disco_items(stanza) local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");