# HG changeset patch # User Waqas Hussain # Date 1276443878 -18000 # Node ID 6bffb5c6313110add571eb81a976d481a02783f8 # Parent a01c6411fdfbb334c556979d044bb04d95dec715 MUC: Updated room:get_default_role() to not assign unaffiliated occupants a role in members-only rooms. diff -r a01c6411fdfb -r 6bffb5c63131 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Jun 13 20:37:09 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 20:44:38 2010 +0500 @@ -91,7 +91,9 @@ elseif affiliation == "member" then return "participant"; elseif not affiliation then - return self:is_moderated() and "visitor" or "participant"; + if not self:is_members_only() then + return self:is_moderated() and "visitor" or "participant"; + end end end