# HG changeset patch # User Waqas Hussain # Date 1361892701 -18000 # Node ID da7857891eb87336e9905c83c6f8570917ff4ad7 # Parent 760c345dc7a1711e73c94dd2715298ff19466b47 MUC: Fix affiliation check for admins, and bring it in line with the spec (thanks Maranda). diff -r 760c345dc7a1 -r da7857891eb8 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Tue Feb 26 19:41:52 2013 +0500 +++ b/plugins/muc/muc.lib.lua Tue Feb 26 20:31:41 2013 +0500 @@ -987,7 +987,7 @@ return true; end if actor_affiliation ~= "owner" then - if actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then + if affiliation == "owner" or affiliation == "admin" or actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then return nil, "cancel", "not-allowed"; end elseif target_affiliation == "owner" and jid_bare(actor) == jid then -- self change