if {![info exist CheckApache]} {
variable CheckApache {}
utimer 1 ApacheCheck
}

proc ApacheCheck {} {
set file {C:/Program/Apache Group/Apache2/logs/access.log}
set handle [open $file r]
set content [split [read $handle] [format %c 10]]
close $handle
set out [lrange $content end-2 end]
variable CheckApache
if {![string equal $out $CheckApache]} {
set CheckApache "$out" 
puthelp "PRIVMSG #apache-log :[ApacheReformat [join $out]]"
}
utimer 1 ApacheCheck
}

proc ApacheReformat {string} {
  set string [split $string [format %c 32]]
  set time [join [lrange [split [lindex $string 3] :] 1 3] :]
  set request [string trimleft [join [lrange $string 5 6]] {"}]
  return "\[$time\] <[lindex $string 0]> $request ([lrange $string 8 9])"
}