Changeset

2100:cbd0095e9302

mod_firewall: Add 'timestamp' dep to get current_timestamp
author Matthew Wild <mwild1@gmail.com>
date Thu, 17 Mar 2016 11:22:35 +0000
parents 2099:a8c701631d0b
children 2101:41a0a9db89ef
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Thu Mar 17 11:22:18 2016 +0000
+++ b/mod_firewall/mod_firewall.lua	Thu Mar 17 11:22:35 2016 +0000
@@ -80,6 +80,7 @@
 		end
 		return table.concat(defs, " ");
 	end, depends = { "date_time" }; };
+	timestamp = { global_code = [[local get_time = require "socket".gettime]]; local_code = [[local current_timestamp = get_time()]]; };
 	throttle = {
 		global_code = function (throttle)
 			assert(idsafe(throttle), "Invalid rate limit name: "..throttle);