All pastes #466682 Raw Edit

zdscript

public text v1 · immutable
·published 2007-05-01 03:33 UTC
rendered paste body
on *:JOIN:#ZeroDown: {
  if (%greeting) {
    notice $nick %greeting
  }
  if (%greeting1) {
    notice $nick %greeting1
  }
  if (%greeting2) {
    notice $nick %greeting2
  }
  if (%greeting3) {
    notice $nick %greeting3
  }
  if (%greeting4) {
    notice $nick %greeting4
  }
}

on *:LOAD: {
  write -c commands.txt
}

on *:TEXT:@*:#ZeroDown: {
  if ($1 == @commands) {
    notice $nick The commands are as follows
    play -n $nick commands.txt 2000
  }
  elseif ($1 == @set) {
    if ($nick == ZeroDown|AsusX64) {
      if ($2 == greeting) { set %greeting $3- }
      else {
        set %c [ $+ [ $2 ] ] $3-
        msg $chan $2 has been set to $3-
      }
    }
  }
  elseif ($1 == @add) {
    if ($nick == ZeroDown|AsusX64) {
      if ($2 != $null) { write commands.txt $2 | msg $chan The Command $2 Has Been Added }
    }
  }
  else {
    set %temp.read $read(commands.txt,w,* $+ $remove($1,@) $+ *)
    if (%temp.read == $remove($1,@)) { 
      set %command $remove($1,@)
      msg $chan %command $+ : %c [ $+ [ %command ] ]
    }
    else { msg $chan Command $1 Not Found }
  }