Software /
code /
prosody
Comparison
plugins/muc/members_only.lib.lua @ 9716:5281a795d6df 0.11
MUC: Adjust priorities of muc-get-default-role handlers (fixes #1272)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 19 Dec 2018 23:14:13 +0000 |
parent | 9035:173c0e16e704 |
child | 10449:2e36a54906e4 |
child | 11545:7b8a482f4efd |
comparison
equal
deleted
inserted
replaced
9714:34c48eed4650 | 9716:5281a795d6df |
---|---|
102 -- No affiliation => role of "none" | 102 -- No affiliation => role of "none" |
103 module:hook("muc-get-default-role", function(event) | 103 module:hook("muc-get-default-role", function(event) |
104 if not event.affiliation and get_members_only(event.room) then | 104 if not event.affiliation and get_members_only(event.room) then |
105 return false; | 105 return false; |
106 end | 106 end |
107 end); | 107 end, 2); |
108 | 108 |
109 -- registration required for entering members-only room | 109 -- registration required for entering members-only room |
110 module:hook("muc-occupant-pre-join", function(event) | 110 module:hook("muc-occupant-pre-join", function(event) |
111 local room = event.room; | 111 local room = event.room; |
112 if get_members_only(room) then | 112 if get_members_only(room) then |