Commit 68f37a3b authored by Ted Trask's avatar Ted Trask

Bug fix to ignore blank lines in word lists

parent 2085d5d5
......@@ -465,6 +465,9 @@ local function checkwords(logentry)
if not thisline then
break
end
-- ignore blank lines
if string.find(thisline, "%S") then
_,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(thisline), " ")
if instcnt ~= 0 then
logentry.ignoreme = true
......@@ -472,6 +475,7 @@ local function checkwords(logentry)
break
end
end
end
if not logentry.ignoreme then
--proceed with record analysis
......@@ -480,6 +484,8 @@ local function checkwords(logentry)
break
end
-- ignore blank lines
if string.find(thisline, "%S") then
_,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(thisline), " ")
if instcnt ~= 0 then
-- logme("instcnt = "..instcnt)
......@@ -488,6 +494,7 @@ local function checkwords(logentry)
badwordloc[#badwordloc+1] = thisline
end
end
end
--check for DansGuardian actions
if (logentry.reason and logentry.reason ~= "") then
......@@ -523,6 +530,9 @@ local function checkwords(logentry)
if not goodline then
break
end
-- ignore blank lines
if string.find(thisline, "%S") then
_,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(goodline), " ")
--if string.find(logentry.URL,goodline) then
if instcnt ~= 0 then
......@@ -535,6 +545,7 @@ local function checkwords(logentry)
end
end
end
end
-- Reset bad to reduce number of bad hits if score is zero
-- if wrdcnt == 0 then
-- isbad=0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment