Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 2984:3094166cfdd5
Merge 0.6 into 0.7.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 01 May 2010 05:18:38 +0500 |
parent | 2978:5760074dc7d4 |
parent | 2979:b1726c2a2afc |
child | 2985:fde53d82fde0 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Mon Apr 19 18:30:59 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sat May 01 05:18:38 2010 +0500 @@ -751,7 +751,7 @@ 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