comparison mod_onions/mod_onions.lua @ 2304:a881494238af

mod_onions: Remove capture of final period (stripped by util.jid)
author Kim Alvefur <zash@zash.se>
date Fri, 23 Sep 2016 11:57:07 +0200
parents db7c80c2d681
children 7db4d3f5fb73
comparison
equal deleted inserted replaced
2303:db7c80c2d681 2304:a881494238af
234 local stanza = event.stanza; 234 local stanza = event.stanza;
235 local to_host = event.to_host; 235 local to_host = event.to_host;
236 local onion_host = nil; 236 local onion_host = nil;
237 local onion_port = nil; 237 local onion_port = nil;
238 238
239 if not to_host:find("%.onion(%.?)$") then 239 if not to_host:find("%.onion$") then
240 if onions_map[to_host] then 240 if onions_map[to_host] then
241 if type(onions_map[to_host]) == "string" then 241 if type(onions_map[to_host]) == "string" then
242 onion_host = onions_map[to_host]; 242 onion_host = onions_map[to_host];
243 else 243 else
244 onion_host = onions_map[to_host].host; 244 onion_host = onions_map[to_host].host;