diff mod_firewall/mod_firewall.lua @ 6548:430584888704

mod_firewall: marks: load marks from storage on login
author Matthew Wild <mwild1@gmail.com>
date Sun, 24 May 2026 10:48:24 +0100
parents de1f17ed4dac
children 7f3ad8a5b2ab
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Sun May 24 18:42:43 2026 +0100
+++ b/mod_firewall/mod_firewall.lua	Sun May 24 10:48:24 2026 +0100
@@ -718,6 +718,7 @@
 	local events_hooked = {};
 	for chain, chain_info in pairs(chain_functions) do
 		local handler_code = chain_info.code;
+		module:log("warn", "Hooking %s for %s", chain, base_name);
 		local new_handler, err = compile_handler(handler_code, "mod_firewall:"..base_name.."::"..chain, chain_info.rules);
 		if not new_handler then
 			module:log("error", "Compilation error for %s: %s", script, err);
@@ -728,11 +729,14 @@
 			if chain_definition and chain_definition.type == "event" then
 				local handler = new_handler(chain_definition.pass_return);
 				for _, event_name in ipairs(chain_definition) do
+					module:log("warn", "Hooking %s...", event_name);
 					events_hooked[event_name] = handler;
 					module:hook(event_name, handler, chain_definition.priority);
 				end
 			elseif chain:sub(1, 5) ~= "user/" then
 				module:log("warn", "Unknown chain %q", chain);
+			else
+				module:log("warn", "Sad");
 			end
 			local event_name, handler = "firewall/chains/"..chain, new_handler(false);
 			events_hooked[event_name] = handler;