anti-massmode change

By [|Red-X|] on Jun 30, 2004

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 user do mass op,deop,voice,or devoice, ban and unban 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 Blacklisted: hdel -w blacklist * | echo $color(info) -a REPORT: removing all Black List done...)
}

Comments

Sign in to comment.
[|Red-X|]   -  Aug 11, 2004

Veigh: blacklisted is an option only, but the main is i want to post, the mass channel mode prevention. it works when someoone do for. ie mode # +oooo nick1 nick2 nick3 nick4 then it will prevent by doing mode # -oooo nick1 nick2 nick3 nick4.. and also for ban,unban.voice etc

 Respond  
Veigh   -  Aug 11, 2004

Again.... A Warscript.... I Don\'t Understand Your Mind, Adit...

 Respond  
[|Red-X|]   -  Jul 02, 2004

to have this witout blacklisted...just cutt off remove the on join, on start and alias addblacklist and it\'s corresponding comand on rawmode event

 Respond  
[|Red-X|]   -  Jul 02, 2004

right lick on menu nicklist and click Clear Blacklisted

 Respond  
opsa   -  Jul 01, 2004

and how i remove blacklist users

 Respond  
opsa   -  Jul 01, 2004

can i ask you somethink how can i have this without blacklist

 Respond  
opsa   -  Jul 01, 2004

can i ask you somethink how can i have this without blacklist

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.