mod_muc_rtbl/mod_muc_rtbl.lua
changeset 5894 ba71fdc8ea73
parent 5356 f6577cdb1d91
equal deleted inserted replaced
5893:2597e2113561 5894:ba71fdc8ea73
   162 	local bare_hash, host_hash = update_hashes(occupant);
   162 	local bare_hash, host_hash = update_hashes(occupant);
   163 	if banned_hashes[bare_hash] or banned_hashes[host_hash] then
   163 	if banned_hashes[bare_hash] or banned_hashes[host_hash] then
   164 		module:log("debug", "Blocked private message from user <%s> from room <%s> due to RTBL match", occupant.bare_jid, event.stanza.attr.to);
   164 		module:log("debug", "Blocked private message from user <%s> from room <%s> due to RTBL match", occupant.bare_jid, event.stanza.attr.to);
   165 		local error_reply = st.error_reply(event.stanza, "cancel", "forbidden", "You are banned from this service", event.room.jid);
   165 		local error_reply = st.error_reply(event.stanza, "cancel", "forbidden", "You are banned from this service", event.room.jid);
   166 		event.origin.send(error_reply);
   166 		event.origin.send(error_reply);
   167 		return true;
   167 		return false; -- Don't route it
   168 	end
   168 	end
   169 end);
   169 end);
   170 
   170 
   171 if prosody.start_time then
   171 if prosody.start_time then
   172 	request_list();
   172 	request_list();