Mercurial > prosody-modules
comparison mod_firewall/mod_firewall.lua @ 2124:89363766202c
mod_firewall: Add comment to document idsafe()
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 17 Mar 2016 21:27:24 +0000 |
| parents | 643b254e75de |
| children | edf5cf3c474b |
comparison
equal
deleted
inserted
replaced
| 2123:d843e8f1ed78 | 2124:89363766202c |
|---|---|
| 35 end | 35 end |
| 36 for k,v in pairs(extra_chains) do | 36 for k,v in pairs(extra_chains) do |
| 37 chains[k] = v; | 37 chains[k] = v; |
| 38 end | 38 end |
| 39 | 39 |
| 40 -- Returns the input if it is safe to be used as a variable name, otherwise nil | |
| 40 function idsafe(name) | 41 function idsafe(name) |
| 41 return name:match("^%a[%w_]*$") | 42 return name:match("^%a[%w_]*$") |
| 42 end | 43 end |
| 43 | 44 |
| 44 -- Dependency locations: | 45 -- Dependency locations: |
