lua-cs-bouncer-mcaptcha/lib/plugins/crowdsec/template.lua

13 lines
239 B
Lua
Raw Permalink Normal View History

2022-01-30 16:24:34 +01:00
local template = {}
2022-01-30 16:28:00 +01:00
function template.compile(template_str, args)
2022-01-30 16:24:34 +01:00
for k, v in pairs(args) do
local var = "{{" .. k .. "}}"
template_str = template_str:gsub(var, v)
end
2022-01-30 16:47:42 +01:00
return template_str
2022-01-30 16:24:34 +01:00
end
return template