All pastes #461969 Raw Edit

Someone

public text v1 · immutable
#461969 ·published 2007-04-27 23:18 UTC
rendered paste body
on *:KICK:#:{ 
  if ($knick == $me) { 
    if ($chan == #iSpy) || ($chan == #bots) { halt } 
    inc $+(%,blackkicks.,$chan) 
    if ($($+(%,blackkicks.,$chan),2) > 5) { 
      write blacklists.txt $chan 
      unset $+(%,blackkicks.,$chan) 
    } 
  } 
} 
alias -l c1 { return $+($chr(3),03,$1-) } 
alias -l c2 { return $+($chr(3),13,$1-) }
on *:JOIN:#: { 
  if (%greetvar == off $nick) { HALT }
  if (%greetvar == on $nick) { 
    if ($readini(greets.ini, greets, $nick)) {
      msg $chan [[ $+ $nick $+ ]] $readini(greets.ini, greets, $nick)
    }
  }
  if ($nick == [-Lord-]) || ($nick == [-Tidus-]) msg $chan 14.:1: 14Bot Owner & Operator 1-7 $nick 1:14:.
  if ($nick == [-Yuna-]) || ($nick == [Julie]) || ($nick == Awful) msg $chan 14.:1: 14Bot Supervisor 1-7 $nick 1:14:.
  if ($nick == [-Home-]) || ($nick == Dj_Burton) || ($nick == Ya-Rly) msg $chan 14.:1: 14Bot Supervisor 1-7 $nick 1:14:.
  if ($nick == Sharpie) || ($nick == Kenny_8642) || ($nick == Paul) || ($nick == Big_Hotsauce) || ($nick == Mine_Fields)  msg $chan 14.:1: 14Bot Supporter 1-7 $nick 1:14:.
  if ($nick == $me) && ($chan == #Tidus) { mode #Tidus -o+h $me $me }
}
Else {
  var %chan = $chan 
  if $read(blacklists.txt,w,$chan) { 
    part $chan This channel has been blacklisted.I will not join this channel without permission. To request unblacklist: /ms send iSpy <Message> 
  } 
  else { 
    if ($($+(%,blackkicks.,$chan),2)) { 
      var %left = $+($calc(5 - $v1),/5) 
    } 
    else { 
      var %left = 5/5 
      msg $chan $c1(iSpy Created by Tidus - Hosted by [-Tidus-]) 
    msg $chan $c1(7WARNING:14 If i am kicked 5 times this channel will be blacklisted. Number of kicks left:) $c2($($+(%,blkicks.,$chan),2)) $c1(/) $c2(5)   } 
  }  
}
on $*:TEXT:/[!.]add(black(list)?|ban)/Si:#:{ 
  var %file = blacklists.txt 
  if ($me ison $2) && ($$2) && (!$read(%file,w,$2) { part $chan This channel has been blacklisted, to discuss unblacklisting, please contact my bot owner. 
    if ($address($nick,2) == $address($me,2) && $left($2,1) == $chr(35)) || ($nick == NICKNAME1) || ($nick == NICKNAME2) { 
      if ($read(%file,w,$2)) { notice $nick $2 is already on the blacklist } 
      else { 
        write %file $2 
        msg $chan $2 Was successfully written to the blacklist 
      } 
    } 
  } 
}
on $*:TEXT:/^[!.]del(black(list)?|ban)/Si:#:{ 
  var %file = blacklists.txt 
  if ($address($nick,2) == $address($me,2) && $left($2,1) == $chr(35)) || ($nick == NICKNAME1) || ($nick == NICKNAME2) { 
    if (!$read(%file,w,$2)) { notice $nick $2 is not on the blacklist } 
    else { 
      write $+(-ds,$2) %file 
      msg $chan $2 Was successfully removed from the blacklist. 
    } 
  } 
}