mod_admin_shell: Add connection created time
authoraidan@jmad.org
Wed, 03 Apr 2024 21:56:03 -0700
changeset 13477 9eb081616842
parent 13476 d5a9847b0e55
child 13478 05c1098084cd
mod_admin_shell: Add connection created time This adds an output format option to show the time that the connection was created. Ref #1852
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Thu Apr 04 19:44:17 2024 +0200
+++ b/plugins/mod_admin_shell.lua	Wed Apr 03 21:56:03 2024 -0700
@@ -867,6 +867,18 @@
 			end
 		end;
 	};
+	created = {
+		title = "Connection Created";
+		description = "Time when connection was created";
+		width = #"YYYY MM DD HH:MM:SS";
+		align = "right";
+		key = "conn";
+		mapper = function(conn)
+			if conn then
+				return os.date("%F %T", math.floor(conn.created));
+			end
+		end;
+	};
 	dir = {
 		title = "Dir";
 		description = "Direction of server-to-server connection";