diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-11-20 18:24:59 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-11-20 18:24:59 +0000 |
commit | 13c8ec7709e5444b377e8280573fde5f5c395634 (patch) | |
tree | 7515aa6cdef38964d7337ed2ed92dcb492c43e9a | |
parent | d9fa806c3744755c76ab914ac54ce137456c0193 (diff) | |
download | acf-weblog-13c8ec7709e5444b377e8280573fde5f5c395634.tar.bz2 acf-weblog-13c8ec7709e5444b377e8280573fde5f5c395634.tar.xz |
Put squark category into block reason
-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 7f09c7d..faac6a7 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 |