@(include "txrban") @(next @(open-tail "/var/log/apache2/www.kylheku.com.log" "r" nil)) @(repeat) @ (all) @ip - - [@(n day)/@(m month)/@(n year):@(n hour):@(n min):@(n sec) @nil] "@method @uri @proto/@ver" @err @bytes "@ref" "@agent" @ (and) @ (if (search-regex agent #/Googlebot|bingbot|baidu/)) @ (bind points nil) @ (elif (search-regex agent #/Ezoom|[Bb][Oo][Tt]|[Ss]pider|[Cc]rawler|[Yy]andex|coccoc/)) @ (bind points 9) @ (elif (not (memqual err '("200" "206" "301" "302" "304")))) @ (bind points 1) @ (else) @ (bind points 0) @ (end) @ (end) @ (do (let ((time (make-time year month day hour min sec :auto))) (if points (report ip time points) (do-expiry time)))) @(end)