Uhm, you missed one section. Thats in case the channel doesn't exist yet.
But I could figure that part myself. Here is the slightly updated version:

Code:
on *:join:#:{
  if (!$hget(PeakStats)) {
    hmake PeakStats 10
    if ($isfile($scriptdir\PeakStats.hsh)) { hload PeakStats $scriptdir\PeakStats.hsh }
  }
  if ($nick(#,0) >= $hget(PeakStats,$chan)) {
    hadd PeakStats $chan $nick(#,0) $ctime
    hsave PeakStats $scriptdir\PeakStats.hsh
  }
  if (!$hget(PeakStats,$chan)) {
    hadd PeakStats $chan $nick(#,0) $ctime
    hsave PeakStats $scriptdir\PeakStats.hsh
  }
}

on *:text:!peak:#:{
  msg $chan On $date($gettok($hget(PeakStats,$chan),2,32),mmm dd yyyy) $+ , there were $gettok($hget(PeakStats,$chan),1,32) users in $chan $+ !
}