Comparison

plugins/muc/muc.lib.lua @ 3261:fe1c93296abd

MUC: Added room:set_hidden(boolean) and room:is_hidden().
author Waqas Hussain <waqas20@gmail.com>
date Sun, 13 Jun 2010 21:54:47 +0500
parent 3260:19b655a8671c
child 3262:330010ef078f
comparison
equal deleted inserted replaced
3260:19b655a8671c 3261:fe1c93296abd
282 if self.save then self:save(true); end 282 if self.save then self:save(true); end
283 end 283 end
284 end 284 end
285 function room_mt:is_persistent() 285 function room_mt:is_persistent()
286 return self._data.persistent; 286 return self._data.persistent;
287 end
288 function room_mt:set_hidden(hidden)
289 hidden = hidden and true or nil;
290 if self._data.hidden ~= hidden then
291 self._data.hidden = hidden;
292 if self.save then self:save(true); end
293 end
294 end
295 function room_mt:is_hidden()
296 return self._data.hidden;
287 end 297 end
288 298
289 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc 299 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
290 local from, to = stanza.attr.from, stanza.attr.to; 300 local from, to = stanza.attr.from, stanza.attr.to;
291 local room = jid_bare(to); 301 local room = jid_bare(to);