From 5d7f3a03ff16f1daeb4b2fe96475d9e5c1cbbcc9 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 13 Jun 2010 20:44:38 +0500 Subject: MUC: Updated room:get_default_role() to not assign unaffiliated occupants a role in members-only rooms. --- plugins/muc/muc.lib.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 1e8b31e3..cf8946eb 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -91,7 +91,9 @@ function room_mt:get_default_role(affiliation) 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 -- cgit v1.2.3