Software /
code /
prosody-modules
Diff
mod_firewall/mod_firewall.lua @ 2585:02c6ae745c4f
mod_firewall: Add 'test' subcommand to read stanzas from stdin and test them against rules
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 26 Feb 2017 09:58:07 +0000 |
parent | 2584:d64fc9c3cffd |
child | 2859:22e11645a895 |
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua Sun Feb 26 09:50:16 2017 +0000 +++ b/mod_firewall/mod_firewall.lua Sun Feb 26 09:58:07 2017 +0000 @@ -672,6 +672,11 @@ local verbose = arg[1] == "-v"; if verbose then table.remove(arg, 1); end + if arg[1] == "test" then + table.remove(arg, 1); + return module:require("test")(arg); + end + local serialize = require "util.serialization".serialize; if verbose then print("local logger = require \"util.logger\".init;");