Software / code / prosody
Comparison
plugins/mod_console.lua @ 1927:c3384860e23f
mod_console: Add a space before '(encrypted)' in s2s:show()
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 06 Oct 2009 10:42:53 +0100 |
| parent | 1924:75e6ba240888 |
| child | 1977:325a49f8edab |
comparison
equal
deleted
inserted
replaced
| 1926:e1c5b537f240 | 1927:c3384860e23f |
|---|---|
| 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..(session.secure and "(encrypted)" or "")); | 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 |
| 502 if session.to_host == host and ((not match_jid) or host:match(match_jid) | 502 if session.to_host == host and ((not match_jid) or host:match(match_jid) |
| 503 or (session.from_host and session.from_host:match(match_jid)) | 503 or (session.from_host and session.from_host:match(match_jid)) |
| 504 -- Pft! is what I say to list comprehensions | 504 -- Pft! is what I say to list comprehensions |
| 505 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then | 505 or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then |
| 506 count_in = count_in + 1; | 506 count_in = count_in + 1; |
| 507 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and "(encrypted)" or "")); | 507 print(" "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and " (encrypted)" or "")); |
| 508 if session.type == "s2sin_unauthed" then | 508 if session.type == "s2sin_unauthed" then |
| 509 print(" Connection not yet authenticated"); | 509 print(" Connection not yet authenticated"); |
| 510 end | 510 end |
| 511 for name in pairs(session.hosts) do | 511 for name in pairs(session.hosts) do |
| 512 if name ~= session.from_host then | 512 if name ~= session.from_host then |