All pastes #413153 Raw Edit

Anonymous

public text v1 · immutable
#413153 ·published 2007-03-28 04:26 UTC
rendered paste body
on *:text:*:#:{
  if ($hget(binds) == $null) { hmake binds }
  if ($exists(binds.db) == $true) { hload binds binds.db }
  if ($mid($1-,1,$len(.)) == .) {
    tokenize 32 $mid($1-,$calc($len(.) + 1) $+ -)
  }
  else { halt }
  if ($hget(binds,$1) != $null) {
    msg $chan $v1
  }
  if ($ulevel >= 4) {
    if ($1 == bind) {
      if ($3 == $null) { notice $nick Please use the correct syntax.  . $+ 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.  . $+ 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
        }
      }
    }
  }
  if ($1 == .join) {
    /join $2
  }
  if ($1 == .part) {
    /part $2
  }
}