Comparison

plugins/muc/muc.lib.lua @ 3253:23a30abcc76e

MUC: Added disco#info features to advertise room's moderation status (muc_moderated or muc_unmoderated).
author Waqas Hussain <waqas20@gmail.com>
date Sun, 13 Jun 2010 20:29:27 +0500
parent 3252:22062c50eabe
child 3254:a01c6411fdfb
comparison
equal deleted inserted replaced
3252:22062c50eabe 3253:23a30abcc76e
208 function room_mt:get_disco_info(stanza) 208 function room_mt:get_disco_info(stanza)
209 return st.reply(stanza):query("http://jabber.org/protocol/disco#info") 209 return st.reply(stanza):query("http://jabber.org/protocol/disco#info")
210 :tag("identity", {category="conference", type="text"}):up() 210 :tag("identity", {category="conference", type="text"}):up()
211 :tag("feature", {var="http://jabber.org/protocol/muc"}):up() 211 :tag("feature", {var="http://jabber.org/protocol/muc"}):up()
212 :tag("feature", {var=self:get_password() and "muc_passwordprotected" or "muc_unsecured"}):up() 212 :tag("feature", {var=self:get_password() and "muc_passwordprotected" or "muc_unsecured"}):up()
213 :tag("feature", {var=self:is_moderated() and "muc_moderated" or "muc_unmoderated"}):up()
213 ; 214 ;
214 end 215 end
215 function room_mt:get_disco_items(stanza) 216 function room_mt:get_disco_items(stanza)
216 local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items"); 217 local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");
217 for room_jid in pairs(self._occupants) do 218 for room_jid in pairs(self._occupants) do