plugins/muc/muc.lib.lua

changeset 3244
616a3bb2bad9
parent 2985
fde53d82fde0
child 3245
a8a4c87a4fbf
equal deleted inserted replaced
3243:dc7131d4e189 3244:616a3bb2bad9
232 if text then 232 if text then
233 error_message = error_message..": "..text; 233 error_message = error_message..": "..text;
234 end 234 end
235 return st.presence({type='unavailable', from=stanza.attr.from, to=stanza.attr.to}) 235 return st.presence({type='unavailable', from=stanza.attr.from, to=stanza.attr.to})
236 :tag('status'):text(error_message); 236 :tag('status'):text(error_message);
237 end
238
239 function room_mt:set_password(password)
240 if password == "" or type(password) ~= "string" then password = nil; end
241 self._data.password = password;
242 return password;
243 end
244 function room_mt:get_password()
245 return self._data.password;
237 end 246 end
238 247
239 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc 248 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
240 local from, to = stanza.attr.from, stanza.attr.to; 249 local from, to = stanza.attr.from, stanza.attr.to;
241 local room = jid_bare(to); 250 local room = jid_bare(to);

mercurial