diff mod_firewall/mod_firewall.lua @ 1324:853a382c9bd6

mod_turncredentials: Advertise the XEP-0215 feature (thanks Gryffus)
author Kim Alvefur <zash@zash.se>
date Fri, 28 Feb 2014 15:36:06 +0100
parents 9f24ccaa66a6
children b21236b6b8d8
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Wed Feb 26 13:08:47 2014 -0800
+++ b/mod_firewall/mod_firewall.lua	Fri Feb 28 15:36:06 2014 +0100
@@ -27,6 +27,10 @@
 		type = "event"; "route/remote";
 		priority = 0.1;
 	};
+	send_remote = { -- FIXME name
+		type = "filter"; "s2sout";
+		priority = 0.1;
+	};
 };
 
 local function idsafe(name)
@@ -372,9 +376,13 @@
 					module:log("error", "Compilation error for %s: %s", script, err);
 				else
 					local chain_definition = chains[chain];
-					if chain_definition and chain_definition.type == "event" then
-						for _, event_name in ipairs(chain_definition) do
-							module:hook(event_name, handler, chain_definition.priority);
+					if chain_definition then
+						if chain_definition.type == "event" then
+							for _, event_name in ipairs(chain_definition) do
+								module:hook(event_name, handler, chain_definition.priority);
+							end
+						elseif chain_definition.type == "filter" then
+							-- TODO
 						end
 					elseif not chain:match("^user/") then
 						module:log("warn", "Unknown chain %q", chain);