diff -r 38402e874b45 -r f2f9fe088f6e plugins/muc/muc.lib.lua --- 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