plugins/muc/muc.lib.lua

changeset 3258
bc07564bec6d
parent 3257
fae054e15e03
child 3259
a5b9209efb23
equal deleted inserted replaced
3257:fae054e15e03 3258:bc07564bec6d
271 if self.save then self:save(true); end 271 if self.save then self:save(true); end
272 end 272 end
273 end 273 end
274 function room_mt:is_members_only() 274 function room_mt:is_members_only()
275 return self._data.members_only; 275 return self._data.members_only;
276 end
277 function room_mt:set_persistent(persistent)
278 persistent = persistent and true or nil;
279 if self._data.persistent ~= persistent then
280 self._data.persistent = persistent;
281 if self.save then self:save(true); end
282 end
283 end
284 function room_mt:is_persistent()
285 return self._data.persistent;
276 end 286 end
277 287
278 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc 288 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
279 local from, to = stanza.attr.from, stanza.attr.to; 289 local from, to = stanza.attr.from, stanza.attr.to;
280 local room = jid_bare(to); 290 local room = jid_bare(to);

mercurial