258 if self.save then self:save(true); end |
258 if self.save then self:save(true); end |
259 end |
259 end |
260 end |
260 end |
261 function room_mt:is_moderated() |
261 function room_mt:is_moderated() |
262 return self._data.moderated; |
262 return self._data.moderated; |
|
263 end |
|
264 function room_mt:set_members_only(members_only) |
|
265 members_only = members_only and true or nil; |
|
266 if self._data.members_only ~= members_only then |
|
267 self._data.members_only = members_only; |
|
268 if self.save then self:save(true); end |
|
269 end |
|
270 end |
|
271 function room_mt:is_members_only() |
|
272 return self._data.members_only; |
263 end |
273 end |
264 |
274 |
265 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
275 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
266 local from, to = stanza.attr.from, stanza.attr.to; |
276 local from, to = stanza.attr.from, stanza.attr.to; |
267 local room = jid_bare(to); |
277 local room = jid_bare(to); |