Comparison

mod_firewall/actions.lib.lua @ 5894:1ac4a59ac575

mod_firewall: Fix syntax error (thanks mirux)
author Matthew Wild <mwild1@gmail.com>
date Thu, 14 Mar 2024 09:48:30 +0000
parent 5891:3f5644aa5c32
comparison
equal deleted inserted replaced
5893:faf1f1c833e8 5894:1ac4a59ac575
261 261
262 function action_handlers.REPORT_TO(spec) 262 function action_handlers.REPORT_TO(spec)
263 local where, reason, text = spec:match("^%s*(%S+) *(%S*) *(.*)$"); 263 local where, reason, text = spec:match("^%s*(%S+) *(%S*) *(.*)$");
264 if reason == "spam" then 264 if reason == "spam" then
265 reason = "urn:xmpp:reporting:spam"; 265 reason = "urn:xmpp:reporting:spam";
266 elseif reason == "abuse" or not reason or reason = "" then 266 elseif reason == "abuse" or not reason or reason == "" then
267 reason = "urn:xmpp:reporting:abuse"; 267 reason = "urn:xmpp:reporting:abuse";
268 end 268 end
269 local code = [[ 269 local code = [[
270 local newstanza = st.stanza("message", { to = %q, from = current_host, id = new_short_id() }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); 270 local newstanza = st.stanza("message", { to = %q, from = current_host, id = new_short_id() }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" });
271 local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza):up(); 271 local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza):up();