mod_muc_rtbl/mod_muc_rtbl.lua
changeset 4817 0a257d1402c3
parent 4816 9cdbb1b5e6f2
child 5177 460f78654864
equal deleted inserted replaced
4816:9cdbb1b5e6f2 4817:0a257d1402c3
    90 end
    90 end
    91 
    91 
    92 module:hook("iq-result/host/rtbl-request", update_list);
    92 module:hook("iq-result/host/rtbl-request", update_list);
    93 
    93 
    94 module:hook("muc-occupant-pre-join", function (event)
    94 module:hook("muc-occupant-pre-join", function (event)
       
    95 	if next(banned_hashes) == nil then return end
       
    96 
    95 	local from_bare = jid.bare(event.stanza.attr.from);
    97 	local from_bare = jid.bare(event.stanza.attr.from);
    96 
    98 
    97 	local affiliation = event.room:get_affiliation(from_bare);
    99 	local affiliation = event.room:get_affiliation(from_bare);
    98 	if affiliation and affiliation ~= "none" then
   100 	if affiliation and affiliation ~= "none" then
    99 		-- Skip check for affiliated users
   101 		-- Skip check for affiliated users