comparison mod_register_json/mod_register_json.lua @ 548:4691e72a055c

mod_register_json: cleaned up useless unused code (thanks Mr. Gecko)
author Marco Cirillo <maranda@lightwitch.org>
date Sat, 14 Jan 2012 19:49:35 +0000
parents 09280dd0b22e
children d8143f627f9f
comparison
equal deleted inserted replaced
547:f0ef6e285d69 548:4691e72a055c
22 local whitelist = module:get_option("reg_servlet_wl") or {} 22 local whitelist = module:get_option("reg_servlet_wl") or {}
23 local blacklist = module:get_option("reg_servlet_bl") or {} 23 local blacklist = module:get_option("reg_servlet_bl") or {}
24 local recent_ips = {} 24 local recent_ips = {}
25 25
26 -- Begin 26 -- Begin
27
28 for _, ip in ipairs(whitelist) do whitelisted_ips[ip] = true end
29 for _, ip in ipairs(blacklist) do blacklisted_ips[ip] = true end
30 27
31 local function http_response(code, message, extra_headers) 28 local function http_response(code, message, extra_headers)
32 local response = { 29 local response = {
33 status = code .. " " .. message, 30 status = code .. " " .. message,
34 body = message .. "\n" } 31 body = message .. "\n" }