mod_firewall/actions.lib.lua
changeset 5874 1ac4a59ac575
parent 5871 3f5644aa5c32
equal deleted inserted replaced
5873:faf1f1c833e8 5874: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();