equal
deleted
inserted
replaced
316 module:hook_global("service-added", function (event) |
316 module:hook_global("service-added", function (event) |
317 if event.name ~= "s2s" then return end |
317 if event.name ~= "s2s" then return end |
318 |
318 |
319 local s2s_sources = portmanager.get_active_services():get("s2s"); |
319 local s2s_sources = portmanager.get_active_services():get("s2s"); |
320 if not s2s_sources then |
320 if not s2s_sources then |
321 module:log("warn", "s2s not listening on any ports, outgoing connections may fail"); |
321 module:log_status("warn", "s2s not listening on any ports, outgoing connections may fail"); |
322 return; |
322 return; |
323 end |
323 end |
324 for source, _ in pairs(s2s_sources) do |
324 for source, _ in pairs(s2s_sources) do |
325 if source == "*" or source == "0.0.0.0" then |
325 if source == "*" or source == "0.0.0.0" then |
326 for _, addr in ipairs(local_addresses("ipv4", true)) do |
326 for _, addr in ipairs(local_addresses("ipv4", true)) do |