plugins/muc/muc.lib.lua
changeset 11717 7623767df468
parent 11502 d61ec5e6ee16
parent 11716 d117b92fd8e4
child 11810 6f7d6712e250
equal deleted inserted replaced
11715:6fbbfa4a1178 11717: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