All pastes #803115 Raw Edit

Someone

public text v1 · immutable
#803115 ·published 2007-11-30 22:12 UTC
rendered paste body
on $*:TEXT:/^[@!](set|add)event/Si:#:{ 
  if (!$isdate($2)) { notice $nick You need a date. | halt }
  if (!$3) { notice $nick You need a time. | halt }
  if (!$4) { notice $nick You need to call the event something. | halt }
  if (!$5) { notice $nick You need a description about the event. | halt }
  if ($nick !isop #) { notice $nick You must be op in #BsK to set an event. | halt }
  if ($nick isop #) && ($isdate($2)) { notice $nick New event " $+ $4 $+ " set for $2 $3 $+ . | $iif(%eventno, inc %eventno, set %eventno 2) | set %event [ $+ [ %eventno ] ] $2- | halt }
}

on *:TEXT:!addmember*:#:{ if ($nick isop #bsk) { set %members %members $2- | notice $nick Member(s) $2- added. | halt } }

on $*:TEXT:/^[!@]event/Si:#:{ if ($nick isin %members) && ($isdate($2)) { 
    set %x 1
    while (%x <= %eventno) {
      if ($gettok(%event [ $+ [ %x ] ],3,32) == $2) {
        notice $nick 1Information for 4 $+ $gettok(%event [ $+ [ %x ] ],2,32) $+ 01: Date: 04 $+ $gettok(%event [ $+ [ %x ] ],1,32) 01Time 04 $+ $gettok(%event [ $+ [ %x ] ],2,32) 01Description 04 $+ $gettok(%event [ $+ [ %x ] ],4-,32)
      }
      inc %x
    }
  }
  else { notice $nick You are not a BsK Member. | halt }
}

alias isdate return $iif($regex($1,/\d?\d\/\d?\d\/\d\d\d\d/),$true,$false)