Mercurial > prosody-modules
comparison mod_firewall/mod_firewall.lua @ 5866:1d1eadff331d
mod_firewall: Support util.id.* as dependencies
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 12 Mar 2024 14:31:21 +0000 |
parents | 866a49f5aa61 |
children | 254a21a104aa |
comparison
equal
deleted
inserted
replaced
5865:bfc35ae9edcb | 5866:1d1eadff331d |
---|---|
304 ]]; | 304 ]]; |
305 depends = { | 305 depends = { |
306 "iplib" | 306 "iplib" |
307 } | 307 } |
308 }; | 308 }; |
309 new_short_id = { | |
310 global_code = [[local new_short_id = require "util.id".short;]]; | |
311 }; | |
312 new_medium_id = { | |
313 global_code = [[local new_medium_id = require "util.id".medium;]]; | |
314 }; | |
315 new_long_id = { | |
316 global_code = [[local new_long_id = require "util.id".long;]]; | |
317 }; | |
309 }; | 318 }; |
310 | 319 |
311 local function include_dep(dependency, code) | 320 local function include_dep(dependency, code) |
312 local dep, dep_param = dependency:match("^([^:]+):?(.*)$"); | 321 local dep, dep_param = dependency:match("^([^:]+):?(.*)$"); |
313 local dep_info = available_deps[dep]; | 322 local dep_info = available_deps[dep]; |