MUC: Updated room:get_default_role() to assign unaffiliated occupants a "visitor" role in moderated rooms.
--- a/plugins/muc/muc.lib.lua Sun Jun 13 20:08:51 2010 +0500
+++ b/plugins/muc/muc.lib.lua Sun Jun 13 20:10:42 2010 +0500
@@ -88,8 +88,10 @@
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