mod_console: Show compression status on s2s:show() output.

Tue, 01 Dec 2009 23:23:51 +0100

author
Tobias Markmann <tm@ayena.de>
date
Tue, 01 Dec 2009 23:23:51 +0100
changeset 2296
23e84604fb00
parent 2295
0d954d52062f
child 2297
a67d06338db0

mod_console: Show compression status on s2s:show() output.

plugins/mod_console.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_console.lua	Tue Dec 01 23:05:32 2009 +0100
+++ b/plugins/mod_console.lua	Tue Dec 01 23:23:51 2009 +0100
@@ -478,7 +478,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..(session.secure and " (encrypted)" or ""));
+				print("    "..host.." -> "..remotehost..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or ""));
 				if session.sendq then
 					print("        There are "..#session.sendq.." queued outgoing stanzas for this connection");
 				end
@@ -515,7 +515,7 @@
 				-- Pft! is what I say to list comprehensions
 				or (session.hosts and #array.collect(keys(session.hosts)):filter(subhost_filter)>0)) then
 				count_in = count_in + 1;
-				print("    "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and " (encrypted)" or ""));
+				print("    "..host.." <- "..(session.from_host or "(unknown)")..(session.secure and " (encrypted)" or "")..(session.compressed and " (compressed)" or ""));
 				if session.type == "s2sin_unauthed" then
 						print("        Connection not yet authenticated");
 				end

mercurial