All pastes #55770 Raw Edit

Unnamed

public text v1 · immutable
#55770 ·published 2006-05-14 11:44 UTC
rendered paste body
on *:TEXT:!bday:#:/msg $chan Type !addb <name> <month> <day> to set your birthday. Type !birth <name> to see how long until your birthday(example: !addb tank59 April 14) (example: !birth tank59). 
on *:TEXT:!addb *:#:{
  if ($2) && ($read(bday.txt,s,$2)) { 
    /msg $chan This name is already on my birthday list.
    halt
  } 
  if ($2 != $read(bday.txt,s,$2)) && ($2) { 
    write bday.txt $2,$3-
    /msg $chan Your birthday has been recorded under the name $2 $+ . 
    halt  
  } 
}  
on *:TEXT:!birth *:#:{
  if ($2) && ($read(bday.txt,s,$2)) && ( $calc($ctime($read(bday.txt,s,$2) $asctime(yyyy) 00:00:00) - $ctime) > 0 ) { 
    msg $chan There are $duration( $calc( $ctime($read(bday.txt,s,$2) $asctime(yyyy) 00:00:00) - $ctime)) left until $read(bday.txt,s,$2) and $2 $+ 's birthday!!! 
    halt  
  }
  elseif ($2) && ($read(bday.txt,s,$2)) {  
    /msg $chan There are $duration($calc($ctime($read(bday.txt,s,$2) $calc($asctime(yyyy)+1) 00:00:00) - $ctime)) left until $read(bday.txt,s,$2) and $2 $+ 's birthday!!!
    halt  
  }
  if (!$read(bday.txt,s,$2)) { 
    /msg $chan I'm sorry $nick $+ . This name ( $+ $2 $+ ) is not in my list of birthdays. 
  }
}