Changeset

3255:6bffb5c63131

MUC: Updated room:get_default_role() to not assign unaffiliated occupants a role in members-only rooms.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 13 Jun 2010 20:44:38 +0500
parents 3254:a01c6411fdfb
children 3256:d96172f78ec2
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Sun Jun 13 20:37:09 2010 +0500
+++ b/plugins/muc/muc.lib.lua	Sun Jun 13 20:44:38 2010 +0500
@@ -91,7 +91,9 @@
 	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