All pastes #255976 Raw Edit

Mine

public text v1 · immutable
#255976 ·published 2006-11-23 16:56 UTC
rendered paste body

on me:*:join:#:{
 if $hget(Blacklist,$+($network,.,$chan)) == $null {
   .hadd -m Blacklist $+($network,.,$chan) 3
   .hadd -m Blacklist $network $addtok($hget(Blacklist,$network),$chan,44)
 }
 elseif $hget(Blacklist,$+($network,.,$chan)) < 1 {
   .msg $chan This channel has been blacklisted
   .part $chan
 }
 else {
   .msg $chan There are $hget(Blacklist,$+($network,.,$chan)) kicks of me left before this channel is blacklisted
 }
}
on *:kick:#:{
 if $knick == $me {
   .hdec -m Blacklist $+($network,.,$chan) 1
   if $hget(Blacklist,$+($network,.,$chan)) {
     .join $chan
   }
 }
}
on *:start:{
 if !$hget(Blacklist) { .hmake Blacklist 10 }
 if $exists(Blacklist.hsh) { .hload Blacklist Blacklist.hsh }
}
on *:exit:{
 .hsave -o Blacklist Blacklist.hsh
}
on *:disconnect:{
 .hsave -o Blacklist Blacklist.hsh
}
on *:connect:{
 if $hget(Blacklist,$network) > 0 {
   .join $hget(Blacklist,$network)
 }
}
on *:text:!remove*:*:{
 if ($nick isop #B0ts-staff) {
   if !$2 {
     .notice $nick 6No network or channel specified.
   }
   elseif !$3 {
     if $hfind(Blacklist,$+($2,.,*),0,w) {
       .hdel -w Blacklist $+($2,.,*)
       .notice $nick 6Network4 $2 6removed from 4blacklist6.
     }
     elseif $hfind(Blacklist,$+(*,.,$2),0,w) {
       .hdel -w Blacklist $+(*,.,$2)
       .notice $nick 6Channel4 $2 6removed from all networks on 4blacklist6.
     }
     else {
       .notice $nick $2 not found in blacklist.
     }
   }
   elseif $hfind(Blacklist,$+($2,.,$3),0) {
     .hdel Blacklist $+($2,.,$3)
     .notice $nick Channel $3 on network $2 removed from blacklist.
   }
   else {
     .notice $nick Channel $3 on network $2 not found on blacklist.
   }
 }
 .hsave -o Blacklist Blacklist.hsh
 .hload Blacklist Blacklist.hsh
} 
on *:text:!blacklistchannel*:*:{
 if ($nick isop #B0ts-staff) {
   if !$2 {
     .notice $nick 6No network or channel specified.
   }
   elseif !$3 {
     if $hfind(Blacklist,$+($2,.,*),0,w) {
       .hdel -m Blacklist $+($2,.,*)
       .notice $nick 6Network4 $2 6added from 4blacklist6.
     }
     elseif $hfind(Blacklist,$+(*,.,$2),0,w) {
       .hdel -m Blacklist $+(*,.,$2)
       .notice $nick 6Channel4 $2 6added from all networks on 4blacklist6.
     }
     else {
       .notice $nick $2 not found in blacklist.
     }
   }
   elseif $hfind(Blacklist,$+($2,.,$3),0) {
     .hdel Blacklist $+($2,.,$3)
     .notice $nick Channel $3 on network $2 added from blacklist.
   }
   else {
     .notice $nick Channel $3 on network $2 not found on blacklist.
   }
 }
 .hsave -o Blacklist Blacklist.hsh
 .hload Blacklist Blacklist.hsh
}