476 for host, host_session in pairs(hosts) do |
476 for host, host_session in pairs(hosts) do |
477 print = function (...) _print(host); _print(...); print = _print; end |
477 print = function (...) _print(host); _print(...); print = _print; end |
478 for remotehost, session in pairs(host_session.s2sout) do |
478 for remotehost, session in pairs(host_session.s2sout) do |
479 if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then |
479 if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then |
480 count_out = count_out + 1; |
480 count_out = count_out + 1; |
481 print(" "..host.." -> "..remotehost..(session.secure and " (encrypted)" or "")); |
481 print(" "..host.." -> "..remotehost..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or "")); |
482 if session.sendq then |
482 if session.sendq then |
483 print(" There are "..#session.sendq.." queued outgoing stanzas for this connection"); |
483 print(" There are "..#session.sendq.." queued outgoing stanzas for this connection"); |
484 end |
484 end |
485 if session.type == "s2sout_unauthed" then |
485 if session.type == "s2sout_unauthed" then |
486 if session.connecting then |
486 if session.connecting then |
513 if session.to_host == host and ((not match_jid) or host:match(match_jid) |
513 if session.to_host == host and ((not match_jid) or host:match(match_jid) |
514 or (session.from_host and session.from_host:match(match_jid)) |
514 or (session.from_host and session.from_host:match(match_jid)) |
515 -- Pft! is what I say to list comprehensions |
515 -- Pft! is what I say to list comprehensions |
516 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then |
516 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then |
517 count_in = count_in + 1; |
517 count_in = count_in + 1; |
518 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and " (encrypted)" or "")); |
518 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or "")); |
519 if session.type == "s2sin_unauthed" then |
519 if session.type == "s2sin_unauthed" then |
520 print(" Connection not yet authenticated"); |
520 print(" Connection not yet authenticated"); |
521 end |
521 end |
522 for name in pairs(session.hosts) do |
522 for name in pairs(session.hosts) do |
523 if name ~= session.from_host then |
523 if name ~= session.from_host then |