diff mod_lastlog2/mod_lastlog2.lua @ 6167:886c985ece61

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
author Kim Alvefur <zash@zash.se>
date Sat, 08 Feb 2025 14:12:18 +0100
parents c5df6d53f17f
children 1447f076c970
line wrap: on
line diff
--- 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