if { [string length [info vars ::lines]] == 0 } {
  set file {C:/Program/Apache Group/Apache2/logs/access.log}
  set handle [open $file r]
  set content [split [read $handle] [format %c 10]]
  set ::lines [expr [llength $content] - 1]
  close $handle
}
utimer 2 ApacheExec
proc ApacheExec {} {
  set data [ApacheCheck]
  foreach i $data {
    if { [string length $i] == 0 } { break };
    puthelp "PRIVMSG #apache-log :[ApacheReformat $i]"
  }
  utimer 2 ApacheExec
}
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 result [lrange $content $::lines [llength $content]]
  set ::lines [expr [llength $content] - 1]
  return $result
}
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])"
}