Software / code / prosody
Comparison
plugins/mod_console.lua @ 1914:e7f6baf39b56
mod_console: s2s:show(): Indicate when a connection is encrypted
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 05 Oct 2009 15:16:34 +0100 |
| parent | 1908:27c1c6e6c583 |
| child | 1924:75e6ba240888 |
comparison
equal
deleted
inserted
replaced
| 1913:da49a59dff7c | 1914:e7f6baf39b56 |
|---|---|
| 465 for host, host_session in pairs(hosts) do | 465 for host, host_session in pairs(hosts) do |
| 466 print = function (...) _print(host); _print(...); print = _print; end | 466 print = function (...) _print(host); _print(...); print = _print; end |
| 467 for remotehost, session in pairs(host_session.s2sout) do | 467 for remotehost, session in pairs(host_session.s2sout) do |
| 468 if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then | 468 if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then |
| 469 count_out = count_out + 1; | 469 count_out = count_out + 1; |
| 470 print(" "..host.." -> "..remotehost); | 470 print(" "..host.." -> "..remotehost..(session.secure and "(encrypted)" or "")); |
| 471 if session.sendq then | 471 if session.sendq then |
| 472 print(" There are "..#session.sendq.." queued outgoing stanzas for this connection"); | 472 print(" There are "..#session.sendq.." queued outgoing stanzas for this connection"); |
| 473 end | 473 end |
| 474 if session.type == "s2sout_unauthed" then | 474 if session.type == "s2sout_unauthed" then |
| 475 if session.connecting then | 475 if session.connecting then |
| 498 | 498 |
| 499 for session in pairs(incoming_s2s) do | 499 for session in pairs(incoming_s2s) do |
| 500 if session.to_host == host and ((not match_jid) or host:match(match_jid) | 500 if session.to_host == host and ((not match_jid) or host:match(match_jid) |
| 501 or (session.from_host and session.from_host:match(match_jid))) then | 501 or (session.from_host and session.from_host:match(match_jid))) then |
| 502 count_in = count_in + 1; | 502 count_in = count_in + 1; |
| 503 print(" "..host.." <- "..(session.from_host or "(unknown)")); | 503 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and "(encrypted)" or "")); |
| 504 if session.type == "s2sin_unauthed" then | 504 if session.type == "s2sin_unauthed" then |
| 505 print(" Connection not yet authenticated"); | 505 print(" Connection not yet authenticated"); |
| 506 end | 506 end |
| 507 for name in pairs(session.hosts) do | 507 for name in pairs(session.hosts) do |
| 508 if name ~= session.from_host then | 508 if name ~= session.from_host then |