the following script is a snippet's/addon which taken from my latest script...and it's been simplified for your lerning purposes....! or you can anyway add into your owned script. I wrote also popups nicklist to enable you to use it instantly. It uses also hashtable...so it;s pretty fast in reading.
This snippet's is to add blacklisted nicks and kick them when they joined a channel that you are on op, and it will prevent and add into blacklisted when a use do mass op,deop,voice,or devoice in a raw.
on !@*:rawmode:#: {
if ($nick == chanserv) { return }
if ($mode(0).op > 3) { raw -q mode $chan -ko [mass-op] $nick | massprevent op $cid $chan $chr(45) $chr(111) | return }
if ($mode(0).deop > 3) { kick $chan $nick mass-deop | massprevent deop $cid $chan $chr(43) $chr(111) | addblacklist mass-deop from $site by $nick on $fulldate | return }
if ($mode(0).voice > 3) { raw -q mode $chan -ko [mass-voices] $nick | massprevent voice $cid $chan $chr(45) $chr(118) | return }
if ($mode(0).devoice > 5) { raw -q mode $chan -ko+o [mass-devoices] $nick $nick | massprevent devoice $cid $chan $chr(43) $chr(118) | return }
if ($mode(0).ban > 3) { raw -q mode $chan -ko [mass-ban] $nick | massprevent ban $cid $chan $chr(45) $chr(98) | return }
if ($mode(0).unban > 5) { massprevent unban $cid $chan $chr(43) $chr(98) }
}
on !*:join:#: {
if ($hfind(blacklist,$address($nick,2),1,w)) {
if ($me isop $chan) { ban -k $chan $nick 2 $gettok($hget(blacklist, $hfind(blacklist, $address($nick,2),1,w)),2-,32) < [IP-matched] }
else { echo $color(info) -ta 4ALERT:12 $nick from $site is blacklisted just joined $chan }
}
}
on *:start:{
if (!$hget(blacklist)) hmake blacklist 30
}
alias addblacklist hadd -m blacklist $fulladdress $nick $1-
alias -l massprevent {
var %nick = $nick
if ($me !isop $3) || (%prevent. [ $+ [ $+($2,$3) ] ]) { goto end }
set -u5 %prevent. [ $+ [ $+($2,$3) ] ] 1
var %n = $mode(0). [ $+ [ $1 ] ]
while (%n > 0) {
%rawnicks. [ $+ [ $+($2,$3) ] ] = $addtok(%rawnicks. [ $+ [ $+($2,$3) ] ],$mode(%n). [ $+ [ $1 ] ],32)
inc %mass.limit
if (%mass.limit == 6) { raw -q mode $3 $4 $+ $str($5,$numtok(%rawnicks. [ $+ [ $+($2,$3) ] ],32)) %rawnicks. [ $+ [ $+($2,$3) ] ] | unset %mass.limit %rawnicks. [ $+ [ $+($2,$3) ] ] }
dec %n
}
if (%rawnicks. [ $+ [ $+($2,$3) ] ]) { raw -q mode $3 $4 $+ $str($5,$numtok(%rawnicks. [ $+ [ $+($2,$3) ] ],32)) %rawnicks. [ $+ [ $+($2,$3) ] ] | unset %mass.limit %rawnicks. [ $+ [ $+($2,$3) ] ] }
:end | addblacklist mass- $+ $1 from $site by %nick on $fulldate
.timerprevent 1 0 notice $3 ALERT: excessive raw mode $1 by %nick
}
menu nicklist {
&Blacklisted
.$iif($hfind(blacklist,$address($snick(#,1),2),1,w),Del,Add): {
%reason = $input(type reason,e,Blacklisted)
if ($hfind(blacklist,$address($snick(#,1),2))) hdel -w blacklist $+($address($snick(#,1),2),*) | else { hadd -m blacklist $address($snick(#,1),5) $snick(#,1) %reason | if ($me isop #) ban -k # $snick(#,1) 2 %reason }
}
.$iif(!$hget(blacklist,0).item,$style(2)) Clear All: hdel -w blacklist * | echo $color(info) -a REPORT: removing all Black List done...)
}
It only does one thing for me .. adds the ban onto the server. If the ban is removed from the server .. it does nothing when the person returns. I don't need a script that is something already built into mIRC kick/ban. I need a black list that will kick/ban EVERY TIME the person comes in .. regardless of them being on the server's ban list or not.
We have a limited number of bans available on the server per channel. We already have more bans than the server allows .. so this is useless.