245 if self.save then self:save(true); end |
245 if self.save then self:save(true); end |
246 end |
246 end |
247 end |
247 end |
248 function room_mt:get_password() |
248 function room_mt:get_password() |
249 return self._data.password; |
249 return self._data.password; |
|
250 end |
|
251 function room_mt:set_moderated(moderated) |
|
252 moderated = moderated and true or nil; |
|
253 if self._data.moderated ~= moderated then |
|
254 self._data.moderated = |
|
255 if self.save then self:save(true); end |
|
256 end |
|
257 end |
|
258 function room_mt:is_moderated() |
|
259 return self._data.moderated; |
250 end |
260 end |
251 |
261 |
252 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
262 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
253 local from, to = stanza.attr.from, stanza.attr.to; |
263 local from, to = stanza.attr.from, stanza.attr.to; |
254 local room = jid_bare(to); |
264 local room = jid_bare(to); |