Changeset

2402:2040330586e4

mod_firewall: Split import of rostermanager into its own dependency
author Kim Alvefur <zash@zash.se>
date Wed, 30 Nov 2016 15:37:51 +0100
parents 2401:7a1625a84624
children 2403:f96bdfd81eba
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Mon Nov 28 08:48:23 2016 +0100
+++ b/mod_firewall/mod_firewall.lua	Wed Nov 30 15:37:51 2016 +0100
@@ -137,11 +137,13 @@
 			return ("local multi_throttle_%s = rates.%s:multi();"):format(throttle, throttle);
 		end;
 	};
+	rostermanager = {
+		global_code = [[local rostermanager = require "core.rostermanager";]];
+	};
 	roster_entry = {
-		global_code = [[local rostermanager = require "core.rostermanager";]];
 		local_code = [[local roster_entry = (rostermanager.load_roster(to_node, to_host) or {})[bare_from];]];
-		depends = { "split_to", "bare_from" };
-	}
+		depends = { "rostermanager", "split_to", "bare_from" };
+	};
 };
 
 local function include_dep(dependency, code)