Software /
code /
prosody-modules
Changeset
2074:86427261e3c4
mod_firewall: Use string.find in JID match, faster since the result is unused
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 11 Mar 2016 18:18:35 +0100 |
parents | 2073:de15606f3669 |
children | 2075:baa1cb349427 |
files | mod_firewall/conditions.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua Fri Mar 11 18:18:04 2016 +0100 +++ b/mod_firewall/conditions.lib.lua Fri Mar 11 18:18:35 2016 +0100 @@ -33,7 +33,7 @@ else pattern = pattern:gsub("%p", "%%%0"):gsub("%%(%p)", wildcard_equivs); end - return ("(%s and %s:match(%q))"):format(part, part, "^"..pattern.."$"); + return ("(%s and %s:find(%q))"):format(part, part, "^"..pattern.."$"); else return ("%s == %q"):format(part, match); end