mod_onions/mod_onions.lua
changeset 1468 cf32265eb4c7
parent 1467 f10a3a5ba28f
child 1593 3e4d15ae2133
child 1621 e0d8caffa209
equal deleted inserted replaced
1467:f10a3a5ba28f 1468:cf32265eb4c7
   223 	session.sendq = nil;
   223 	session.sendq = nil;
   224 end
   224 end
   225 
   225 
   226 -- Try to intercept anything to *.onion
   226 -- Try to intercept anything to *.onion
   227 local function route_to_onion(event)
   227 local function route_to_onion(event)
       
   228 	local stanza = event.stanza;
   228 
   229 
   229 	if not event.to_host:find(".onion(.?)$") then
   230 	if not event.to_host:find(".onion(.?)$") then
   230 		if forbid_else then
   231 		if forbid_else then
   231 	                module:log("debug", event.to_host .. " is not an onion. Blocking it.");
   232 	                module:log("debug", event.to_host .. " is not an onion. Blocking it.");
   232 			return false;
   233 			return false;