comparison mod_c2s_conn_throttle/mod_c2s_conn_throttle.lua @ 929:9eefbaba274d

mod_c2s_conn_throttle: shorten / update header, as wiki was added.
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 12 Mar 2013 19:05:03 +0100
parents 15763c1d085c
children 7dbde05b48a9
comparison
equal deleted inserted replaced
924:0a78ac54bd03 929:9eefbaba274d
1 -- Clients Connection Throttler. 1 -- Clients Connection Throttler.
2 -- Usage: 2 -- (C) 2012-2013, Marco Cirillo (LW.Org)
3 -- Add the module into modules loaded into the virtual host section
4 --
5 -- cthrottler_logins_count = 3 -> number of logins attempt allowed
6 -- cthrottler_time = 120 -> in x seconds
7 3
8 local time = os.time 4 local time = os.time
9 local in_count = {} 5 local in_count = {}
10 local logins_count = module:get_option_number("cthrottler_logins_count", 3) 6 local logins_count = module:get_option_number("cthrottler_logins_count", 3)
11 local throttle_time = module:get_option_number("cthrottler_time", 60) 7 local throttle_time = module:get_option_number("cthrottler_time", 60)