# HG changeset patch # User daurnimator # Date 1386717315 0 # Node ID 69f7840923f5637a08f4af548414dc5352fecc07 # Parent 34fbe58d19da43b70fa93c9a6542ac3d8c534138 mod_srvinjection: Make the map a shared table so that other plugins can use/modify it diff -r 34fbe58d19da -r 69f7840923f5 mod_srvinjection/mod_srvinjection.lua --- a/mod_srvinjection/mod_srvinjection.lua Fri Dec 06 02:31:47 2013 +0000 +++ b/mod_srvinjection/mod_srvinjection.lua Tue Dec 10 23:15:15 2013 +0000 @@ -3,9 +3,10 @@ local adns = require "net.adns"; -local map = module:get_option("srvinjection") or {}; +local map_config = module:get_option("srvinjection") or {}; +local map = module:shared "s2s_map" -for host, mapping in pairs(map) do +for host, mapping in pairs(map_config) do if type(mapping) == "table" and type(mapping[1]) == "string" and (type(mapping[2]) == "number") then local connecthost, connectport = mapping[1], mapping[2] or 5269; map[host] = {{