parent
9a0719f17e
commit
bf46b250bd
@ -144,7 +144,7 @@ ip_list.wrap = "off"
|
|||||||
ip_list.validate = function(self, value)
|
ip_list.validate = function(self, value)
|
||||||
local ipmasks= {}
|
local ipmasks= {}
|
||||||
value = value:gsub("^%s+", ""):gsub("%s+$","\n"):gsub("\r\n","\n"):gsub("[ \t]*\n[ \t]*", "\n")
|
value = value:gsub("^%s+", ""):gsub("%s+$","\n"):gsub("\r\n","\n"):gsub("[ \t]*\n[ \t]*", "\n")
|
||||||
string.gsub(value, '[^' .. "\r\n" .. ']+', function(w) table.insert(ipmasks, w) end)
|
string.gsub(value, "[^\r\n]+", function(w) table.insert(ipmasks, w) end)
|
||||||
for index, ipmask in ipairs(ipmasks) do
|
for index, ipmask in ipairs(ipmasks) do
|
||||||
if ipmask:find("geoip:") and ipmask:find("geoip:") == 1 and not ipmask:find("%s") then
|
if ipmask:find("geoip:") and ipmask:find("geoip:") == 1 and not ipmask:find("%s") then
|
||||||
elseif ipmask:find("ext:") and ipmask:find("ext:") == 1 and not ipmask:find("%s") then
|
elseif ipmask:find("ext:") and ipmask:find("ext:") == 1 and not ipmask:find("%s") then
|
||||||
|
Loading…
Reference in New Issue
Block a user