diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-05-01 05:18:38 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-05-01 05:18:38 +0500 |
commit | 3376282d8aacc5814519e16c8b04809f24b9f248 (patch) | |
tree | 7e5980dff5518468ef2d7f18b66f4826b5ab62e9 /plugins/muc/muc.lib.lua | |
parent | 2d68866021180ac35c77b6022e717bc727280177 (diff) | |
parent | 170a2e9b64199f9a72976f5e24556d30c851192e (diff) | |
download | prosody-3376282d8aacc5814519e16c8b04809f24b9f248.tar.gz prosody-3376282d8aacc5814519e16c8b04809f24b9f248.zip |
Merge 0.6 into 0.7.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 1081c5ff..18c80325 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -751,7 +751,7 @@ end function room_mt:set_role(actor, occupant_jid, role, callback, reason) if role == "none" then role = nil; end if role and role ~= "moderator" and role ~= "participant" and role ~= "visitor" then return nil, "modify", "not-acceptable"; end - if self:get_affiliation(actor) ~= "owner" then return nil, "cancel", "not-allowed"; end + if self:get_role(self._jid_nick[actor]) ~= "moderator" then return nil, "cancel", "not-allowed"; end local occupant = self._occupants[occupant_jid]; if not occupant then return nil, "modify", "not-acceptable"; end if occupant.affiliation == "owner" or occupant.affiliation == "admin" then return nil, "cancel", "not-allowed"; end |