mod_firewall/conditions.lib.lua
changeset 2556 18b6a55dd5d6
parent 2549 9b46d24edf0d
child 2557 7ed2a66bfabd
equal deleted inserted replaced
2555:9392f45b0364 2556:18b6a55dd5d6
    64 function condition_handlers.FROM(from)
    64 function condition_handlers.FROM(from)
    65 	return compile_jid_match("from", from), { "split_from" };
    65 	return compile_jid_match("from", from), { "split_from" };
    66 end
    66 end
    67 
    67 
    68 function condition_handlers.FROM_EXACTLY(from)
    68 function condition_handlers.FROM_EXACTLY(from)
    69 	return ("from == %q"):format(from), { "from" };
    69 	local metadeps = {};
       
    70 	return ("from == %s"):format(metaq(from, metadeps)), { "from", unpack(metadeps) };
    70 end
    71 end
    71 
    72 
    72 function condition_handlers.TO_EXACTLY(to)
    73 function condition_handlers.TO_EXACTLY(to)
    73 	return ("to == %q"):format(to), { "to" };
    74 	local metadeps = {};
       
    75 	return ("to == %s"):format(metaq(to, metadeps)), { "to", unpack(metadeps) };
    74 end
    76 end
    75 
    77 
    76 function condition_handlers.TO_SELF()
    78 function condition_handlers.TO_SELF()
    77 	return ("to == nil");
    79 	return ("to == nil");
    78 end
    80 end