Give this a try...I would test it, but there's no one that I know online for me to test it with
Code:
 on *:open:?:{
  var %log = $+($logdir,$nick,.log)
  if $exists(%log) {
    var %lines = $lines(%log), %line = $iif($lines(%log) > 5,$calc($v1 - 5),1)
    while %line <= %lines {
      echo -gt $nick $read(%log,nt,%line)
      inc %line
    }
  }
}