Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 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 |
parent | 3254:a01c6411fdfb |
child | 3256:d96172f78ec2 |
comparison
equal
deleted
inserted
replaced
3254:a01c6411fdfb | 3255:6bffb5c63131 |
---|---|
89 if affiliation == "owner" or affiliation == "admin" then | 89 if affiliation == "owner" or affiliation == "admin" then |
90 return "moderator"; | 90 return "moderator"; |
91 elseif affiliation == "member" then | 91 elseif affiliation == "member" then |
92 return "participant"; | 92 return "participant"; |
93 elseif not affiliation then | 93 elseif not affiliation then |
94 return self:is_moderated() and "visitor" or "participant"; | 94 if not self:is_members_only() then |
95 return self:is_moderated() and "visitor" or "participant"; | |
96 end | |
95 end | 97 end |
96 end | 98 end |
97 | 99 |
98 function room_mt:broadcast_presence(stanza, sid, code, nick) | 100 function room_mt:broadcast_presence(stanza, sid, code, nick) |
99 stanza = get_filtered_presence(stanza); | 101 stanza = get_filtered_presence(stanza); |