From 55a682f29bf8540ddaf5bd04284c91e04046973d Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 13 Jun 2010 20:10:42 +0500 Subject: MUC: Updated room:get_default_role() to assign unaffiliated occupants a "visitor" role in moderated 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 6e50a9b3..50100557 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -88,8 +88,10 @@ room_mt.__index = room_mt; function room_mt:get_default_role(affiliation) if affiliation == "owner" or affiliation == "admin" then return "moderator"; - elseif affiliation == "member" or not affiliation then + elseif affiliation == "member" then return "participant"; + elseif not affiliation then + return self:is_moderated() and "visitor" or "participant"; end end -- cgit v1.2.3