Software /
code /
prosody
Changeset
1743:d00b144f4bcf
MUC: An admin or owner MUST NOT be able to revoke moderation privileges from another admin or owner.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 07 Sep 2009 20:31:35 +0500 |
parents | 1742:1483a62d69bb |
children | 1744:265863a5612b |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Mon Sep 07 20:30:16 2009 +0500 +++ b/plugins/muc/muc.lib.lua Mon Sep 07 20:31:35 2009 +0500 @@ -454,7 +454,7 @@ if self:get_affiliation(actor) ~= "owner" then return nil, "cancel", "not-allowed"; end local occupant = self._occupants[nick]; if not occupant then return nil, "modify", "not-acceptable"; end - if jid_bare(actor) == occupant.jid then return nil, "cancel", "not-allowed"; end + if occupant.affiliation == "owner" or occupant.affiliation == "admin" then return nil, "cancel", "not-allowed"; end local p = st.presence({from = nick, type = "unavailable"}) :tag("x", {xmlns = "http://jabber.org/protocol/muc#user"}) :tag("item", {affiliation=occupant.affiliation, nick=nick, role=role or "none"}):up();