# HG changeset patch # User Kim Alvefur # Date 1435247659 -7200 # Node ID 6efeb801d62f67f0da9578199816f4573845fcaf # Parent bea3862b6bde1531d6cb25dab6d5baa20c8e80c7 Backed out changeset bea3862b6bde in favor of a different approach diff -r bea3862b6bde -r 6efeb801d62f plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Tue Jun 16 15:13:47 2015 +0200 +++ b/plugins/muc/mod_muc.lua Thu Jun 25 17:54:19 2015 +0200 @@ -44,11 +44,16 @@ return um_is_admin(jid, module.host); end +local _set_affiliation = muc_new_room.room_mt.set_affiliation; local _get_affiliation = muc_new_room.room_mt.get_affiliation; function muclib.room_mt:get_affiliation(jid) if is_admin(jid) then return "owner"; end return _get_affiliation(self, jid); end +function muclib.room_mt:set_affiliation(actor, jid, affiliation, callback, reason) + if is_admin(jid) then return nil, "modify", "not-acceptable"; end + return _set_affiliation(self, actor, jid, affiliation, callback, reason); +end local function room_route_stanza(room, stanza) module:send(stanza); end local function room_save(room, forced)