diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-11-20 18:59:36 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-11-20 18:59:36 +0000 |
commit | 070326369d070928c8523448f327d0b98e67321c (patch) | |
tree | e409bd6291bfbf7a3b13dda3fc78f55e28344c0f /weblog-model.lua | |
parent | b6585d749e3da3d65a0c8de0e2a066a2ebb0c454 (diff) | |
download | acf-weblog-070326369d070928c8523448f327d0b98e67321c.tar.bz2 acf-weblog-070326369d070928c8523448f327d0b98e67321c.tar.xz |
Put squark category into block reason
Diffstat (limited to 'weblog-model.lua')
-rw-r--r-- | weblog-model.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/weblog-model.lua b/weblog-model.lua index bdfabcb..085239b 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -514,6 +514,12 @@ local function checkwords(logentry) end end + --check for Squark category + if (logentry.squarkcategory and logentry.squarkcategory ~= "") then + logentry.reason = logentry.squarkcategory + logentry.shortreason = logentry.squarkcategory + end + for i,goodline in ipairs(goodwords) do if not goodline then break @@ -543,7 +549,7 @@ end local function parsesquidlog(line) -- Format of squid log (space separated): - -- time elapsed remotehost code/status bytes method URL rfc931 peerstatus/peerhost + -- time elapsed remotehost code/status bytes method URL rfc931 peerstatus/peerhost ? squarkcategory/squarkaction local words = {} for word in string.gmatch(line, "%S+") do |