diff options
author | aidan <aidan@jmad.org> | 2024-04-03 21:56:03 -0700 |
---|---|---|
committer | aidan <aidan@jmad.org> | 2024-04-03 21:56:03 -0700 |
commit | 5550be6381760d973ff94a22cbb1111b545b212d (patch) | |
tree | 30f7e11f920ea1fd0df090f8f6f5c0928dd2aa44 | |
parent | 0c03df98fe281ede101c844f8460bb832999cfdc (diff) | |
download | prosody-5550be6381760d973ff94a22cbb1111b545b212d.tar.gz prosody-5550be6381760d973ff94a22cbb1111b545b212d.zip |
mod_admin_shell: Add connection created time
This adds an output format option to show the time that the connection was created.
Ref #1852
-rw-r--r-- | plugins/mod_admin_shell.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 45a891f4..d085ce43 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -867,6 +867,18 @@ available_columns = { 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"; |