plugins/muc/muc.lib.lua
branch0.11
changeset 9617 4d7b925652d9
parent 9616 abf9bacf77d4
child 9619 66c6edf56397
child 9644 28d4b9d5a432
equal deleted inserted replaced
9616:abf9bacf77d4 9617:4d7b925652d9
   968 	if _aff and _aff_rank and not _rol then
   968 	if _aff and _aff_rank and not _rol then
   969 		-- You need to be at least an admin, and be requesting info about your affifiliation or lower
   969 		-- You need to be at least an admin, and be requesting info about your affifiliation or lower
   970 		-- e.g. an admin can't ask for a list of owners
   970 		-- e.g. an admin can't ask for a list of owners
   971 		local affiliation_rank = valid_affiliations[affiliation or "none"];
   971 		local affiliation_rank = valid_affiliations[affiliation or "none"];
   972 		if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank)
   972 		if (affiliation_rank >= valid_affiliations.admin and affiliation_rank >= _aff_rank)
   973 		or (self:get_members_only() and self:get_whois() == "anyone" and affiliation_rank >= valid_affiliations.member) then
   973 		or (self:get_whois() == "anyone") then
   974 			local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin");
   974 			local reply = st.reply(stanza):query("http://jabber.org/protocol/muc#admin");
   975 			for jid in self:each_affiliation(_aff or "none") do
   975 			for jid in self:each_affiliation(_aff or "none") do
   976 				local nick = self:get_registered_nick(jid);
   976 				local nick = self:get_registered_nick(jid);
   977 				reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up();
   977 				reply:tag("item", {affiliation = _aff, jid = jid, nick = nick }):up();
   978 			end
   978 			end