All pastes #471716 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-05-05 02:38 UTC
rendered paste body
on *:TEXT:.service*:#: {
  if ($me isop $chan) {
    if (on isin $2) {
      if (on isin $read(service.txt,s,$chan)) {
        msg $chan Services are already ON in this channel.
      }
      else {
        write -dl service.txt $chan
        write service.txt $chan on
        msg $chan Services are now ON in this channel.
      }
    }
    elseif (off isin $2) {
      if (off isin $read(service.txt,s,$chan)) {
        msg $chan Services are already Off in this channel.
      }
      else {
        write -dl service.txt $chan
        write service.txt $chan off
        msg $chan Services are now OFF in this channel.
      }
    }
  }
}

on *:TEXT:.add*:#:{
  if ($address($nick,2) == *!*@Swift-B7332A99.res.nb.dhcp.sigecom.net) {
    if ($address($2,2) isin $read($chan $+ .txt)) {
      write -dl $chan $+ .txt $address($2,2)
      write $chan $+ .txt $address($2,2) $3
    } 
    else {
      write $chan $+ .txt $address($2,2) $3
    }
  }
}
on *:JOIN:#:{
  if (on isin $read(service.txt,s,$chan)) {
    echo -a  $gettok($read($chan $+ .txt,w,$address($nick,2) $+ *),1,32)
    if ($address($nick,2) == $gettok($read($chan $+ .txt,w,$address($nick,2) $+ *),1,32)) {
      set %oplevel $read($chan $+ .txt,s,$address($nick,2))
      if (%oplevel == 9999) {
        mode $chan +qo $nick $nick
      }
      elseif (%oplevel >= 10) && (%oplevel < 9999) {
        mode $chan +oa $nick $nick
      }
      elseif (%oplevel >= 5) && (%oplevel < 10) {
        mode $chan +o $nick
      }
      elseif (%oplevel = 4) {
        mode $chan +h $nick
      }
      elseif (%oplevel = 3) {
        mode $chan +v $nick
      }
      elseif (%oplevel > 3) {
        echo -a Not on Access
      }
    }
    unset %oplevel
  }
}

alias add {
  write $1 $+ .txt $address($2,2) $3
  echo -a $2 Has Been Added to The Access Script of $1 at a Level of $3
}