Diff

mod_firewall/mod_firewall.lua @ 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
parent 2385:c0c2f8665c3e
child 2404:9af2d36567a8
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)