plugins/muc/muc.lib.lua

changeset 3251
f2f9fe088f6e
parent 3250
38402e874b45
child 3252
22062c50eabe
--- 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
 

mercurial