Software /
code /
prosody-modules
Comparison
mod_firewall/conditions.lib.lua @ 971:53e158e44a44
mod_firewall: Add rate limiting capabilities, and keep zones and throttle objects in shared tables
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 06 Apr 2013 22:20:59 +0100 |
parent | 968:f3b0ddeebd9d |
child | 979:cec42f884475 |
comparison
equal
deleted
inserted
replaced
970:adcb751f22f3 | 971:53e158e44a44 |
---|---|
168 table.insert(conditions, "("..table.concat(clause, " "..op.." ")..")"); | 168 table.insert(conditions, "("..table.concat(clause, " "..op.." ")..")"); |
169 end | 169 end |
170 return table.concat(conditions, " or "), { "time:hour,min" }; | 170 return table.concat(conditions, " or "), { "time:hour,min" }; |
171 end | 171 end |
172 | 172 |
173 function condition_handlers.LIMIT(name) | |
174 return ("not throttle_%s:poll(1)"):format(name), { "throttle:"..name }; | |
175 end | |
176 | |
173 return condition_handlers; | 177 return condition_handlers; |