Comparison

plugins/muc/muc.lib.lua @ 7444:45d28235ebe0

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 28 May 2016 12:51:12 +0200
parent 7427:bf43a08e5a74
parent 7443:4a178edc9847
child 7488:cdabf8199903
comparison
equal deleted inserted replaced
7441:df1be36f87b1 7444:45d28235ebe0
870 local _rol = item.attr.role; 870 local _rol = item.attr.role;
871 if _aff and _aff_rank and not _rol then 871 if _aff and _aff_rank and not _rol then
872 -- You need to be at least an admin, and be requesting info about your affifiliation or lower 872 -- You need to be at least an admin, and be requesting info about your affifiliation or lower
873 -- e.g. an admin can't ask for a list of owners 873 -- e.g. an admin can't ask for a list of owners
874 local affiliation_rank = valid_affiliations[affiliation or "none"]; 874 local affiliation_rank = valid_affiliations[affiliation or "none"];
875 if affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank then 875 if affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank
876 or self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member then
876 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin"); 877 local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin");
877 for jid in self:each_affiliation(_aff or "none") do 878 for jid in self:each_affiliation(_aff or "none") do
878 reply:tag("item", {affiliation = _aff, jid = jid}):up(); 879 reply:tag("item", {affiliation = _aff, jid = jid}):up();
879 end 880 end
880 origin.send(reply:up()); 881 origin.send(reply:up());