mod_admin_adhoc: Add some flags to s2s listing command
authorKim Alvefur <zash@zash.se>
Thu, 07 Nov 2019 17:07:02 +0100
changeset 10402 fa50789d6ec7
parent 10401 921e8b00778e
child 10403 270cb2821566
mod_admin_adhoc: Add some flags to s2s listing command These are present in mod_admin_telnet and relevant to s2s
plugins/mod_admin_adhoc.lua
--- a/plugins/mod_admin_adhoc.lua	Thu Nov 07 00:20:54 2019 +0100
+++ b/plugins/mod_admin_adhoc.lua	Thu Nov 07 17:07:02 2019 +0100
@@ -392,6 +392,12 @@
 	if session.cert_identity_status == "valid" then
 		flags[#flags+1] = "authenticated";
 	end
+	if session.dialback_key then
+		flags[#flags+1] = "dialback";
+	end
+	if session.external_auth then
+		flags[#flags+1] = "SASL";
+	end
 	if session.secure then
 		flags[#flags+1] = "encrypted";
 	end
@@ -404,6 +410,12 @@
 	if session.ip and session.ip:match(":") then
 		flags[#flags+1] = "IPv6";
 	end
+	if session.incoming and session.outgoing then
+		flags[#flags+1] = "bidi";
+	elseif session.is_bidi or session.bidi_session then
+		flags[#flags+1] = "bidi";
+	end
+
 	line[#line+1] = "("..t_concat(flags, ", ")..")";
 
 	return t_concat(line, " ");