mod_firewall/actions.lib.lua
changeset 5869 bfc35ae9edcb
parent 5544 1249ab2f797c
child 5871 3f5644aa5c32
equal deleted inserted replaced
5868:b5a110544fd4 5869:bfc35ae9edcb
   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 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 }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" });
   270 		local newstanza = st.stanza("message", { to = %q, from = current_host }):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();