All pastes #822467 Raw Edit

Stuff

public text v1 · immutable
·published 2007-12-18 19:21 UTC
rendered paste body
on $*:TEXT:/^[@!]goal/Si:#: { 
  if ($nick !isreg $chan) { 
    if ($left($1,1) == !) var %disp = notice $nick 
    if ($left($1,1) == @)  var %disp = msg $chan 
    if (!$2) notice $nick You must provide a nick. 
    else { 
      var %x = 1
      while ($read(goals.ini, %x)) {
        if ($2 isin $read(goals.ini, %x)) var %goal = $iif(%goal,$v1 $+ $eval($chr(44),1))  $right($read(goals.ini, %x),- $+ $pos($read(goals.ini, %x),=))
        inc %x
      }
      if (!%goal) notice $nick Test has no goals set.
      else %disp Goals of $2 are: %goal
    } 
  } 
}