Comparison

plugins/muc/muc.lib.lua @ 3260:19b655a8671c

MUC: Added disco#info features to advertise room's persistence status (muc_persistent or muc_temporary).
author Waqas Hussain <waqas20@gmail.com>
date Sun, 13 Jun 2010 21:43:53 +0500
parent 3259:a5b9209efb23
child 3261:fe1c93296abd
comparison
equal deleted inserted replaced
3259:a5b9209efb23 3260:19b655a8671c
212 :tag("identity", {category="conference", type="text"}):up() 212 :tag("identity", {category="conference", type="text"}):up()
213 :tag("feature", {var="http://jabber.org/protocol/muc"}):up() 213 :tag("feature", {var="http://jabber.org/protocol/muc"}):up()
214 :tag("feature", {var=self:get_password() and "muc_passwordprotected" or "muc_unsecured"}):up() 214 :tag("feature", {var=self:get_password() and "muc_passwordprotected" or "muc_unsecured"}):up()
215 :tag("feature", {var=self:is_moderated() and "muc_moderated" or "muc_unmoderated"}):up() 215 :tag("feature", {var=self:is_moderated() and "muc_moderated" or "muc_unmoderated"}):up()
216 :tag("feature", {var=self:is_members_only() and "muc_membersonly" or "muc_open"}):up() 216 :tag("feature", {var=self:is_members_only() and "muc_membersonly" or "muc_open"}):up()
217 :tag("feature", {var=self:is_persistent() and "muc_persistent" or "muc_temporary"}):up()
217 ; 218 ;
218 end 219 end
219 function room_mt:get_disco_items(stanza) 220 function room_mt:get_disco_items(stanza)
220 local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items"); 221 local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");
221 for room_jid in pairs(self._occupants) do 222 for room_jid in pairs(self._occupants) do