Here's a pseudo switch thingy for giving time on join. Note: it's untested and I probably wouldn't suggest coding this way:
Code:
 ON ^*:JOIN:*:echo $color(info) $chan $nick joined $chan at $switch($time(h:n:tt)) | haltdef
alias switch {
  tokenize 58 $1
  goto $iif((($2) && ($isid) && ($1 isnum 1-12) && ($2 isnum 0-59)),$iif($istok(0 15 30 45,$2,32),$2,$iif($2 < 30,past,to)),error)
  :0
  return exactly $1 o'clock $3
  :15
  return a quarter past $1 $3
  :30 
  return half past $1 $3
  :past 
  return $2 $iif($2 == 1,minute,minutes) past $1 $3
  :45 
  return a quarter to $iif($1 == 12,1 $3,$calc($1 + 1) $iif($3,$iif($1 == 11,$iif($3 == am,pm,am),$3)))
  :to 
  return $calc(60 - $2) $iif($2 == 59,minute,minutes) to $iif($1 == 12,1 $3,$calc($1 + 1) $iif($3,$iif($1 == 11,$iif($3 == am,pm,am),$3)))
  :error 
  echo $color(wallops) -a SWITCH statement called incorrectly
} 

Edit: correcting typo's caused double-spacing

Last edited by Mardeg; 11/08/06 11:24 AM.