Mercurial > prosody-modules
diff mod_firewall/marks.lib.lua @ 6557:2d916ba3253c
mod_firewall: marks: Fix shell commands
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 24 May 2026 20:04:03 +0100 |
| parents | f9d93d7cd6d5 |
| children |
line wrap: on
line diff
--- a/mod_firewall/marks.lib.lua Sun May 24 20:03:20 2026 +0100 +++ b/mod_firewall/marks.lib.lua Sun May 24 20:04:03 2026 +0100 @@ -1,3 +1,5 @@ +local jid = require "prosody.util.jid"; + local mark_storage = module:open_store("firewall_marks", "keyval+"); local user_sessions = prosody.hosts[module.host].sessions; @@ -58,7 +60,7 @@ host_selector = "user_jid"; handler = function(self, user_jid, mark_name) --luacheck: ignore 212/self 212/host local username, host = jid.split(user_jid); - if not username or not hosts[host] then + if not username or not prosody.hosts[host] then return nil, "Invalid JID supplied"; elseif not idsafe(mark_name) then return nil, "Invalid characters in mark name"; @@ -125,7 +127,7 @@ return users[a] < users[b]; end); for _, username in ipairs(usernames) do - self.session.print(username, os.date("%Y-%m-%d %R:%s", users[username]); + self.session.print(username, os.date("%Y-%m-%d %R:%s", users[username])); end return true, ("Showing %d users"):format(#usernames); end;
