Software /
code /
prosody
Changeset
3244:616a3bb2bad9
MUC: Added room:get_password() and room:set_password().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 13 Jun 2010 18:13:18 +0500 |
parents | 3243:dc7131d4e189 |
children | 3245:a8a4c87a4fbf |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sun Jun 13 04:07:38 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 18:13:18 2010 +0500 @@ -236,6 +236,15 @@ :tag('status'):text(error_message); end +function room_mt:set_password(password) + if password == "" or type(password) ~= "string" then password = nil; end + self._data.password = password; + return password; +end +function room_mt:get_password() + return self._data.password; +end + function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc local from, to = stanza.attr.from, stanza.attr.to; local room = jid_bare(to);