comparison plugins/mod_account_activity.lua @ 14168:4f4c346e4f39

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 19 May 2026 19:27:43 +0100
parents 04c3687b5641 0c81b8fede94
children 3b26b8772fb1
comparison
equal deleted inserted replaced
14164:78c89ff001bf 14168:4f4c346e4f39
58 { name = "host"; type = "string" }; 58 { name = "host"; type = "string" };
59 { name = "duration"; type = "string" }; 59 { name = "duration"; type = "string" };
60 }; 60 };
61 host_selector = "host"; 61 host_selector = "host";
62 handler = function(self, host, duration, opts) --luacheck: ignore 212/self 62 handler = function(self, host, duration, opts) --luacheck: ignore 212/self
63 opts = opts or {};
64
63 local um = require "prosody.core.usermanager"; 65 local um = require "prosody.core.usermanager";
64 local duration_sec = require "prosody.util.human.io".parse_duration(duration or ""); 66 local duration_sec = require "prosody.util.human.io".parse_duration(duration or "");
65 if not duration_sec then 67 if not duration_sec then
66 return false, ("Invalid duration %q - try something like \"30d\""):format(duration); 68 return false, ("Invalid duration %q - try something like \"30d\""):format(duration);
67 end 69 end