# HG changeset patch # User Matthew Wild # Date 1779649443 -3600 # Node ID 2d916ba3253cab1cdd58569d17bed76213f5c164 # Parent 7477e97a9045b7eac139c38b4d2985d862557211 mod_firewall: marks: Fix shell commands diff -r 7477e97a9045 -r 2d916ba3253c mod_firewall/marks.lib.lua --- 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;