proc kzCup:LogReader {} {
	global conf
	if {$conf(size_log) < [file size $conf(files_logfile)]} {
		set of [open $conf(files_logfile) r]
		seek ${of} ${conf(size_log)}
		while {![eof ${of}]} {
			set line [gets ${of}]
			if {$line == ""} { continue; }
			lappend lines ${line}
		}
		set conf(size_log) [file size $conf(files_logfile)]
		close ${of}
		foreach line [split ${lines} \n] {
			if {[regexp {: \"(.*)<\d+><(.*)><.*>\" say \"(.*?)\"} ${line} "" nick steamid text]} {
				if {[kzCup:ServerCheckIfUserIsAdmin $steamid]} { kzCup:CheckServerCommand ${nick} "${text}" }
			}
		}
	}
	utimer 1 kzCup:LogReader
}

if {![info exists utimersrunning]} {
	set utimersrunning 1
	utimer 1 kzCup:LogReader
}
