on *:JOIN:#:.timer 1 1 bc $nick $chan alias -l bc { if ($read(Blacklist.txt,w,$1)) || ($read(Blacklist.txt,w,$address($1,2))) { var %rd = $readn if (($me !isop $2) && ($me !ishop $2)) || (*Q* iswmcs $chan($2).mode) || (($me ishop $2) && ($1 isop $2)) echo -st 4/!\14 Blacklist match! Channel:010 $2 14Nick:10 $1 14Address:010 $Address($1,2) 14Match:010 $iif($chr(64) isin $ifmatch,Address,Nick) 14Reason:010 $iif($read(BlackListReason.txt,%rd) == Null,Unspecified,$read(BlackListReason.txt,%rd)) 14NOTE: I cannot kick this user! else { echo -st 10/!\14 Blacklist match! Channel:10 $2 14Nick:10 $1 14Address:010 $Address($1,2) 14Match:10 $iif($chr(64) isin $ifmatch,Address,Nick) 14Reason:10 $iif($read(BlackListReason.txt,%rd) == Null,Unspecified,$read(BlackListReason.txt,%rd)) 14Temp banning010 $1 14for010 5 14minutes. ban -ku1800 $2 $2 2 10[14Blacklisted10] 14Reason:010 $iif($read(BlackListReason.txt,%rd) == Null,Unspecified,$read(BlackListReason.txt,%rd)) $kickc } } } on *:TEXT:!bl*:#: { if ($nick ishop $chan || $nick isop $chan) { if ($2) { write BlackList.txt $iif($2 ison $chan,$address($2,2),$2) write BlackListReason.txt $3- msg $chan 10[14BlackList10]14 Successfully written10 $2 14to blacklist. 10Reason:4 $3- if ($2 ison $chan) { if (($nick !isop $chan) && ($nick !ishop $chan)) || (*Q* iswmcs $chan($active).mode) || (($nick ishop $chan(%x)) && ($nick($chan(%x),%y) isop $chan(%x))) echo -st 14I cannot kick010 $1 14from10 $chan $+ 14! else ban -ku1800 $chan $2 2 10[14BlackList10] 14Reason:10 $iif($3,$3-,Unspecified) $kickc } } else { write BlackList.txt $iif($2 ison $active,$address($2,2),$2) write BlackListReason.txt Null msg $chan 10[14BlackList10]14 Successfully written010 $1 14to blacklist. No reason specified. if ($2 ison $chan) { if (($nick !isop $chan) && ($nick !ishop $chan)) || (*Q* iswmcs $chan($active).mode) || (($nick ishop $chan(%x)) && ($nick($chan(%x),%y) isop $chan(%x))) echo -st 14I cannot kick010 $1 14from10 $chan $+ 14! else ban -ku1800 $chan $2 2 10[14BlackList10] 14Reason:10 $iif($3,$3-,Unspecified) $kickc } } } } on *:TEXT:!debl*:#: { if ($nick ishop $chan || $nick isop $chan) { set %B $readn set -u600 %r $read(BlackList.txt,%B) set -u600 %rr $read(BlackListReason.txt,%B) msg $chan 10[14 Blacklist 10]14 Deleting:10 $read(BlackList.txt,%B) 14With reason:10 $iif($read(BlackListReason.txt,%B) == Null,Unspecified,$read(BlackListReason.txt,%B)) 14from the blacklist. write -ds [ $+ [ %B ] ] BlackList.txt write -ds [ $+ [ %B ] ] BlackListReason.txt GlobalUnban $iif($chr(64) !isin $read(BlackList.txt,%B),$address($v2,2),$v2) unset %B } else { msg $chan 10[14Blacklist10]14 Error: No blacklist set to delete. Try 10!debl
14. } } on *:TEXT:!rebl*:#: { if (%r) { write BlackList.txt %r write BlackListReason.txt %rr notice $nick 10[14Blacklist10]14 Successfully re-written010 %rbl 14to blacklist. Reason:010 $iif(%rblr == Null,Unspecified,%rblr) $+ 14. unset %r %rr } else notice $nick 10[14Blacklist10]14 Error: No user was recently un-blacklisted. } on *:TEXT:!listbl*:#: { if ($lines(BlackList.txt) >= 30) $iif($?!="30+ Blacklists found. Continue? $crlf $+ Doing so will notice $lines(BlackList.txt) lines to you $+ .",,halt) notice $nick 10[14Blacklist10]14 Blacklisted user list $+(10[,14,$lines(BlackList.txt),10/14,$lines(BlackListReason.txt),10]14:) (Latest first) if ($lines(BlackList.txt) == 0) notice $nick 10[14Blacklist10]14 None. else { var %la = $lines(BlackList.txt) var %lc = $lines(BlackList.txt) while (%lc >= 1) { notice $Nick $+(10[14,$calc((%la - %lc) + 1),10]) 10User:14 $read(BlackList.txt,%lc) 10Reason:14 $iif($read(BlackListReason.txt,%lc) == Null,Unspecified,$read(BlackListReason.txt,%lc)) dec %lc } } } on *:TEXT:!checkbl*:#: { if ($nick ishop $chan || $nick isop $chan) { var %x = 1, %z = 0, %w = 0 while (%x <= $chan(0)) { var %y = 1 while (%y <= $nick($chan(%x),0)) { if ($read(Blacklist.txt,w,$nick($chan(%x),%y))) || ($read(Blacklist.txt,w,$address($nick($chan(%x),%y),2))) { var %q = $readn inc %z msg $chan 010/!\ 14Blacklist match: Channel:10 $chan(%x) 14Nick:10 $nick($chan(%x),%y) 14Match:10 $ifmatch if ($nick !isop $chan(%x)) && ($nick !ishop $chan(%x)) || (*Q* iswmcs $chan($chan(%x)).mode) || (($nick ishop $chan(%x)) && ($nick($chan(%x),%y) isop $chan(%x))) notice $nick 14I cannot kick010 $nick($chan(%x),%y) 14from10 $chan(%x) $+ 14! else ban -ku300 $chan(%x) $nick($chan(%x),%y) 2 10[14Blacklisted10] 14Reason:10 $iif($read(BlackListReason.txt,%q) == Null,Unspecified,$read(BlackListReason.txt,%q)) $kickc } inc %w inc %y } inc %x } msg $chan 14Finished checking010 %w 14users on010 $chan(0) 14 $+ $iif($chan(0) == 1,channel,channels) $+ , blacklists found:010 %z } } on *:TEXT:!globalunban*:#: { if (!$2) { halt } var %x = 1, %z = 0 while (%x <= $chan(0)) { if ($nick isop $chan(%x)) || ($nick ishop $chan(%x)) mode $chan(%x) -b $1 inc %x } notice $Nick 14Globally unbanned010 $1 } on *:TEXT:!blinfo*:#: { notice $nick 10[14Blacklist10]14 Blacklists found: $+(10[,14,$lines(BlackList.txt),10/14,$lines(BlackListReason.txt),10]14.) notice $nick 10[14Blacklist10]14 Commands: 10!bl !debl !blcheck !listbl !rebl } alias kickc { inc %kickcounter | return 10»14 $bytes(%kickcounter,db) 10« }