Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 11713:7623767df468
Merge 0.11->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 23 Jul 2021 17:13:06 +0200 |
| parents | d61ec5e6ee16 d117b92fd8e4 |
| children | 6f7d6712e250 |
comparison
equal
deleted
inserted
replaced
| 11711:6fbbfa4a1178 | 11713:7623767df468 |
|---|---|
| 1108 if _aff and _aff_rank and not _rol then | 1108 if _aff and _aff_rank and not _rol then |
| 1109 -- You need to be at least an admin, and be requesting info about your affiliation or lower | 1109 -- You need to be at least an admin, and be requesting info about your affiliation or lower |
| 1110 -- e.g. an admin can't ask for a list of owners | 1110 -- e.g. an admin can't ask for a list of owners |
| 1111 local affiliation_rank = valid_affiliations[affiliation or "none"]; | 1111 local affiliation_rank = valid_affiliations[affiliation or "none"]; |
| 1112 if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank) | 1112 if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank) |
| 1113 or (self:get_whois() == "anyone") then | 1113 or (self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member) then |
| 1114 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); | 1114 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); |
| 1115 for jid in self:each_affiliation(_aff or "none") do | 1115 for jid in self:each_affiliation(_aff or "none") do |
| 1116 local nick = self:get_registered_nick(jid); | 1116 local nick = self:get_registered_nick(jid); |
| 1117 reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up(); | 1117 reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up(); |
| 1118 end | 1118 end |
