Mercurial > prosody-modules
comparison mod_firewall/mod_firewall.lua @ 2099:a8c701631d0b
mod_firewall: Make idsafe() a global function so libraries can re-use it
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Mar 2016 11:22:18 +0000 |
parents | a435db77a5e5 |
children | cbd0095e9302 |
comparison
equal
deleted
inserted
replaced
2098:1124758cac7f | 2099:a8c701631d0b |
---|---|
25 type = "event"; "route/remote"; | 25 type = "event"; "route/remote"; |
26 priority = 0.1; | 26 priority = 0.1; |
27 }; | 27 }; |
28 }; | 28 }; |
29 | 29 |
30 local function idsafe(name) | 30 function idsafe(name) |
31 return not not name:match("^%a[%w_]*$") | 31 return name:match("^%a[%w_]*$") |
32 end | 32 end |
33 | 33 |
34 -- Dependency locations: | 34 -- Dependency locations: |
35 -- <type lib> | 35 -- <type lib> |
36 -- <type global> | 36 -- <type global> |