Originally Posted By: Horstl
In the on text event, it's missing an evaluation of the variable to get not the variable's name, but it's value:
$($+(%,peak.,$chan),2)

Code:
on *:text:!peak:#yourchan,#anotherchan,...: {
  var %val = $($+(%,peak.,$chan),2)
  msg $chan On $date($gettok(%val,2,32),mmm dd yyyy) $+ , there were $gettok(%val,1,32) users in $chan $+ !
}


To format the output of the date/time, check:
/help $asctime


Uh, any reason why $nick(#,0) or $ctime isn't included in your code?