mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Merge branch 'master' of github.com:neocities/neocities
This commit is contained in:
commit
dec243f14d
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,8 @@ class Stat < Sequel::Model
|
|||
def parse_logfiles(path)
|
||||
total_site_stats = {}
|
||||
|
||||
cache_control_ip = Resolv::DNS.new.getaddress('neocities.org')
|
||||
|
||||
Dir["#{path}/*.log"].each do |log_path|
|
||||
site_logs = {}
|
||||
|
||||
|
@ -30,6 +32,8 @@ class Stat < Sequel::Model
|
|||
|
||||
time, username, size, path, ip, referrer = hit_array
|
||||
|
||||
next if ip == cache_control_ip
|
||||
|
||||
log_time = Time.parse time
|
||||
|
||||
next if !referrer.nil? && referrer.match(/bot/i)
|
||||
|
|
Loading…
Add table
Reference in a new issue