Mercurial > prosody-modules
comparison mod_firewall/mod_firewall.lua @ 2520:c6fd8975704b
mod_firewall: Initial support for lists, in-memory and HTTP
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 19 Feb 2017 21:10:26 +0000 |
parents | 0e1054c19f9d |
children | 0404476ecfe3 |
comparison
equal
deleted
inserted
replaced
2519:d4bc434a60a4 | 2520:c6fd8975704b |
---|---|
189 }; | 189 }; |
190 roster_entry = { | 190 roster_entry = { |
191 local_code = [[local roster_entry = (to_node and rostermanager.load_roster(to_node, to_host) or {})[bare_from];]]; | 191 local_code = [[local roster_entry = (to_node and rostermanager.load_roster(to_node, to_host) or {})[bare_from];]]; |
192 depends = { "rostermanager", "split_to", "bare_from" }; | 192 depends = { "rostermanager", "split_to", "bare_from" }; |
193 }; | 193 }; |
194 list = { global_code = function (list) | |
195 assert(idsafe(list), "Invalid list name: "..list); | |
196 assert(active_definitions.LIST[list], "Unknown list: "..list); | |
197 return ("local list_%s = lists[%q];"):format(list, list); | |
198 end | |
199 }; | |
194 }; | 200 }; |
195 | 201 |
196 local function include_dep(dependency, code) | 202 local function include_dep(dependency, code) |
197 local dep, dep_param = dependency:match("^([^:]+):?(.*)$"); | 203 local dep, dep_param = dependency:match("^([^:]+):?(.*)$"); |
198 local dep_info = available_deps[dep]; | 204 local dep_info = available_deps[dep]; |