All pastes #414800 Raw Edit

Anonymous

public text v1 · immutable
#414800 ·published 2007-03-29 09:34 UTC
rendered paste body
ON $*:TEXT:/^[!@.]event/Si:#sow:{
  VAR %output = $iif($Left($1,1) == @,msg $chan,.notice $nick)
  if ($2 == date) {
    VAR %j = 1
    WHILE (%j <= $Lines(eventdates.txt)) {
      VAR %name = $AddTok(%name,$GetTok($Read(eventdates.txt,%j),1,32),32)
      INC %j
    }
    IF (%name) %output 2There are events on:4 $Replace(%name,$Chr(32),2 $Chr(44) 4 $Chr(32)) 2(Type4 !event dd/mm/yyyy2 to know more about the events)
    ELSE %output There are no events!
  }

  elseif (!$2) { 
    if ($readini(event.ini ,$date,Event) == $null) { %output 2There are no events set for $date . Please use4 !event date2 to see on what dates there are events.
    }
    else %output 2The event for4 $date 2is4 $readini(event.ini ,$date,Event) 
  } 
  else {
    if ($readini(event.ini ,$2,Event) == $null) { %output 2There are no events for $2 . Please use4 !event date2 to see on what dates there are events.
    }
    else %output 2The event for4 $2 2is4 $readini(event.ini ,$2,Event)
  } 
}