All pastes #405747 Raw Edit

Something

public text v1 · immutable
·published 2007-03-21 22:20 UTC
rendered paste body
on *:JOIN:#ranked5: {
  notice $nick 4,1·0 %greeting1 4·
  notice $nick 4,1·0 %greeting2 4·
  notice $nick 4,1·0 %greeting2 4·
}

on *:TEXT:*greeting1*:#ranked5: {
  if ($1 == %trig $+ greeting1) {
    if ($ulevel >= 4) { 
      set %greeting1 $2-
    }
    else {
      notice $nick Error >> You do not have enough access to use this command. #ranked5
    }
  }
}

on *:TEXT:*greeting2*:#ranked5: {
  if ($1 == %trig $+ greeting2) {
    if ($ulevel >= 4) { 
      set %greeting2 $2-
    }
    else {
      notice $nick Error >> You do not have enough access to use this command.
    }
  }
}

on *:TEXT:*greeting3*:#ranked5: {
  if ($1 == %trig $+ greeting3) {
    if ($ulevel >= 4) { 
      set %greeting3 $2-
    }
    else {
      notice $nick Error >> You do not have enough access to use this command.
    }
  }
}

on *:TEXT:*:#ranked5:{
  if ($hget(binds) == $null) { hmake binds }
  if ($exists(binds.db) == $true) { hload binds binds.db }
  if ($mid($1-,1,$len(%trig)) == %trig) {
    tokenize 32 $mid($1-,$calc($len(%trig) + 1) $+ -)
  }
  else { halt }
  if ($hget(binds,$1) != $null) {
    notice $nick 4,1·0 $remove($1,%trig) 4·0 $v1 4·
  }
  if ($ulevel >= 4) {
    if ($1 == bind) {
      if ($3 == $null) { notice $nick Please use the correct syntax.  %trig $+ bind <command> <text> }
      else {
        hadd binds $2 $3-
        notice $nick Command $2 successfully bound to: $3-
        hsave binds binds.db
      }
    }
  }
  if ($ulevel >= 4) {
    if ($1 == unbind) {
      if ($2 == $null) { notice $nick Please use the correct syntax.  %trig $+ unbind <command>
      }
      else {
        if ($hget(binds,$2) == $null) { notice $nick Command doesnt exist. }
        else {
          hdel binds $2
          notice $nick Successfully unbound command: $2
          hsave binds binds.db
        }
      }
    }
  }
}