summaryrefslogtreecommitdiffstats
path: root/weblog-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-09-16 11:44:13 +0000
committerTed Trask <ttrask01@yahoo.com>2009-09-16 11:44:13 +0000
commit0c3e15063708f6218288ee5a30de090900655e0f (patch)
tree02a3dea01414766883cb7d7ab17041c131fe4f88 /weblog-model.lua
parent8044a8225aa46c9cb7cbc39920fabf5edd782b59 (diff)
downloadacf-weblog-0c3e15063708f6218288ee5a30de090900655e0f.tar.bz2
acf-weblog-0c3e15063708f6218288ee5a30de090900655e0f.tar.xz
Fixed bug with score, bumped version to 0.4.1v0.4.1
Bug caused an exception when there was a ':' but no score in the block reason.
Diffstat (limited to 'weblog-model.lua')
-rw-r--r--weblog-model.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/weblog-model.lua b/weblog-model.lua
index 1d67739..6ebc766 100644
--- a/weblog-model.lua
+++ b/weblog-model.lua
@@ -548,7 +548,7 @@ local parsedglog = function(logdata)
local logentry = {logdatetime=words[1], clientuserid=words[2], clientip=words[3], URL=words[4], reason=words[5], method=words[6], bytes=words[7], shortreason=words[9]}
if logentry.reason ~= "" then
if logentry.shortreason == "" then logentry.shortreason = logentry.reason end
- logentry.score = string.match(logentry.reason, "^.*: ([0-9]*) ")
+ logentry.score = string.match(logentry.reason, "^.*: ([0-9]+) ")
logentry.logdatetime = string.gsub(logentry.logdatetime, "%.", "-")
logentries[#logentries+1] = logentry