Changeset

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
parents 1913:da49a59dff7c
children 1916:7f8928aa0b9d
files plugins/mod_console.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_console.lua	Mon Oct 05 15:00:05 2009 +0100
+++ b/plugins/mod_console.lua	Mon Oct 05 15:16:34 2009 +0100
@@ -467,7 +467,7 @@
 		for remotehost, session in pairs(host_session.s2sout) do
 			if (not match_jid) or remotehost:match(match_jid) or host:match(match_jid) then
 				count_out = count_out + 1;
-				print("    "..host.." -> "..remotehost);
+				print("    "..host.." -> "..remotehost..(session.secure and "(encrypted)" or ""));
 				if session.sendq then
 					print("        There are "..#session.sendq.." queued outgoing stanzas for this connection");
 				end
@@ -500,7 +500,7 @@
 			if session.to_host == host and ((not match_jid) or host:match(match_jid) 
 				or (session.from_host and session.from_host:match(match_jid))) then
 				count_in = count_in + 1;
-				print("    "..host.." <- "..(session.from_host or "(unknown)"));
+				print("    "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and "(encrypted)" or ""));
 				if session.type == "s2sin_unauthed" then
 						print("        Connection not yet authenticated");
 				end