Mercurial > prosody-modules
comparison mod_firewall/conditions.lib.lua @ 2075:baa1cb349427
mod_firewall: Pass results as arguments to format instead of shadowning variable [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 11 Mar 2016 18:19:59 +0100 |
parents | 86427261e3c4 |
children | f445f43b9ba1 |
comparison
equal
deleted
inserted
replaced
2074:86427261e3c4 | 2075:baa1cb349427 |
---|---|
93 return ("stanza:get_child(nil, %q)"):format(payload_ns); | 93 return ("stanza:get_child(nil, %q)"):format(payload_ns); |
94 end | 94 end |
95 | 95 |
96 function condition_handlers.INSPECT(path) | 96 function condition_handlers.INSPECT(path) |
97 if path:find("=") then | 97 if path:find("=") then |
98 local path, match = path:match("(.-)=(.*)"); | 98 return ("stanza:find(%q) == %q"):format(path:match("(.-)=(.*)")); |
99 return ("stanza:find(%q) == %q"):format(path, match); | |
100 end | 99 end |
101 return ("stanza:find(%q)"):format(path); | 100 return ("stanza:find(%q)"):format(path); |
102 end | 101 end |
103 | 102 |
104 function condition_handlers.FROM_GROUP(group_name) | 103 function condition_handlers.FROM_GROUP(group_name) |