Merge branch 'master' of github.com:neocities/neocities

This commit is contained in:
Kyle Drake 2016-10-13 02:06:53 -05:00
commit dec243f14d

View file

@ -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)