Mercurial > prosody-modules
comparison mod_firewall/actions.lib.lua @ 960:d773a51af9b1
mod_firewall: Add actions EVENT (fire an event), JUMP EVENT (transfer control to the handlers of an event), JUMP CHAIN (transfer control to another mod_firewall chain)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 05 Apr 2013 18:08:16 +0100 |
parents | 6ef334596276 |
children | f0108ec2b016 |
comparison
equal
deleted
inserted
replaced
959:6ef334596276 | 960:d773a51af9b1 |
---|---|
160 | 160 |
161 function action_handlers.RULEDEP(dep) | 161 function action_handlers.RULEDEP(dep) |
162 return "", { dep }; | 162 return "", { dep }; |
163 end | 163 end |
164 | 164 |
165 function action_handlers.EVENT(name) | |
166 return ("fire_event(%q, event)"):format(name); | |
167 end | |
168 | |
169 function action_handlers.JUMP_EVENT(name) | |
170 return ("do return fire_event(%q, event); end"):format(name); | |
171 end | |
172 | |
173 function action_handlers.JUMP_CHAIN(name) | |
174 return ("do return fire_event(%q, event); end"):format("firewall/chains/"..name); | |
175 end | |
176 | |
165 return action_handlers; | 177 return action_handlers; |