# HG changeset patch # User Kim Alvefur # Date 1739020338 -3600 # Node ID 886c985ece61d65a4e1b20931d7cddb0f6ea9fe8 # Parent 3e7fe14921d08df6bb969f9a76b5c5d483640477 mod_lastlog2: Skip initializing internal API (and storage) in prosodyctl Initializing storage in the global context under prosodyctl causes the module.command to fail to execute because the storage module has already been loaded. Introduced in 7b722955c59b diff -r 3e7fe14921d0 -r 886c985ece61 mod_lastlog2/mod_lastlog2.lua --- a/mod_lastlog2/mod_lastlog2.lua Thu Feb 06 17:07:00 2025 +0000 +++ b/mod_lastlog2/mod_lastlog2.lua Sat Feb 08 14:12:18 2025 +0100 @@ -47,7 +47,7 @@ end); end -do +if module.host ~= "*" then local user_sessions = prosody.hosts[module.host].sessions; local kv_store = module:open_store(); function get_last_active(username) --luacheck: ignore 131/get_last_active