238 :tag('status'):text(error_message); |
238 :tag('status'):text(error_message); |
239 end |
239 end |
240 |
240 |
241 function room_mt:set_password(password) |
241 function room_mt:set_password(password) |
242 if password == "" or type(password) ~= "string" then password = nil; end |
242 if password == "" or type(password) ~= "string" then password = nil; end |
243 self._data.password = password; |
243 if self._data.password ~= password then |
244 return password; |
244 self._data.password = password; |
|
245 if self.save then self:save(true); end |
|
246 end |
245 end |
247 end |
246 function room_mt:get_password() |
248 function room_mt:get_password() |
247 return self._data.password; |
249 return self._data.password; |
248 end |
250 end |
249 |
251 |