# HG changeset patch # User Georg Lukas # Date 1581954144 -3600 # Node ID 38504ec4c89b925c86ded2deed9eb5e58bf75ca0 # Parent 117a979ef93006c5958cff5e828fea58b4bc5280 mod_list_inactive: report last action timestamp diff -r 117a979ef930 -r 38504ec4c89b mod_list_inactive/mod_list_inactive.lua --- a/mod_list_inactive/mod_list_inactive.lua Sat Feb 08 15:29:35 2020 +0100 +++ b/mod_list_inactive/mod_list_inactive.lua Mon Feb 17 16:42:24 2020 +0100 @@ -14,8 +14,8 @@ local output_formats = { default = "%s", - event = "%s %s", - delete = "user:delete%q -- %s" + event = "%s %s %s", + delete = "user:delete%q -- %s -- %s" } function module.command(arg) @@ -24,7 +24,7 @@ print("time is a number followed by 'day', 'week', 'month' or 'year'"); print("formats are:"); for name, fmt in pairs(output_formats) do - print(name, fmt:format("user@example.com", "last action")) + print(name, fmt:format("user@example.com", "", "")) end return; end @@ -44,7 +44,7 @@ local last_action = last_active and last_active.event or "?" last_active = last_active and last_active.timestamp or 0; if last_active < max_age then - print(output:format(jid_join(user, host), last_action)); + print(output:format(jid_join(user, host), last_action, os.date('%Y-%m-%d %H:%M:%S', last_active))); end end end