Ban Protection

By Disturbed on Dec 22, 2006

New Page, Remotes.

on *:ban:#:{
  if (%protect. [ $+ [ $banmask ] ] == $null) { halt }
  mode $chan +e $banmask
  if ($nick != $me) { 
    kick $chan $nick Nice try, $nick $+ .
    mode $chan +b $address($nick,2)
  }
  mode $chan -b $banmask
  msg $chan -3Protection engaged- $banmask was unbanned -DiStUrBiRc v2.0-
}

on *:rawmode:#:{
  if (-e isin $1-) {
    if (%protect. [ $+ [ $2 ] ] != $null) {
      mode $chan +e $2
    }
  }
}

on *:join:#:{
  if (%protect. [ $+ [ $address($nick,2) ] ]) {
    mode $chan +e $address($nick,2)
  }
}

on *:kick:#:{
  set %kchan $chan
  if ($knick == $me) {
    /cs unban %kchan
  }
}

alias setprotect {
  set %protect. [ $+ [ $address($$1,0) ] ] 0
  set %protect. [ $+ [ $address($$1,1) ] ] 0
  set %protect. [ $+ [ $address($$1,2) ] ] 0
  set %protect. [ $+ [ $address($$1,3) ] ] 0
  set %protect. [ $+ [ $address($$1,4) ] ] 0
  set %protect. [ $+ [ $address($$1,5) ] ] 0
  set %protect. [ $+ [ $address($$1,6) ] ] 0
  set %protect. [ $+ [ $address($$1,7) ] ] 0
  set %protect. [ $+ [ $address($$1,8) ] ] 0
}

alias unprotect {
  unset %protect. [ $+ [ $address($$1,0) ] ]
  unset %protect. [ $+ [ $address($$1,1) ] ]
  unset %protect. [ $+ [ $address($$1,2) ] ]
  unset %protect. [ $+ [ $address($$1,3) ] ]
  unset %protect. [ $+ [ $address($$1,4) ] ]
  unset %protect. [ $+ [ $address($$1,5) ] ]
  unset %protect. [ $+ [ $address($$1,6) ] ]
  unset %protect. [ $+ [ $address($$1,7) ] ]
  unset %protect. [ $+ [ $address($$1,8) ] ]
}

menu nicklist {
  Ban Protect
  .Add $$1 $+ :setprotect $$1 | echo -a Protection set for $$1
  .Del $$1 $+ :unprotect $$1 | echo -a $$1 unprotected
}

Comments

Sign in to comment.
Cheiron   -  Jan 19, 2008

the answer to that onw is nice and simple Levy.. in order to prevent being banned from channel you need to either be (A) an AOP and been banned by either an AOP or a HOP... or (B) an SOP and been banned by an SOP, AOP, HOP.
so basically you must have equal or higher status than the banner for the script to work... prefrebly higher. the bot or yourself should have SOP or Owner status

 Respond  
Levy   -  Jan 18, 2008

hi, does the bot i put this script in need more access then the user its banning?

 Respond  
Sanjie   -  Jan 14, 2007

:Othis will unban you from any channel even if you\'re not an Op?

 Respond  
F*U*R*B*Y*   -  Dec 26, 2006

cakerx keep ur coments to urself if you cant say something nice. LMFAO!

read the comment rules.

Always be constructive

he is BEING constructive, telling you how to make it better.

 Respond  
Disturbed   -  Dec 26, 2006

cakerx keep ur coments to urself if you cant say something nice....
and Lindrian, i suppose in some cases that would work but mostly its used for server stuff.

 Respond  
Lindrian   -  Dec 23, 2006

But, I barley used raws before, but isnt it supposed to look something like this:
raw 471:*: { cs invite $2 }

?

 Respond  
CakerX   -  Dec 23, 2006

kid, read the help file on while loops, and while you are at it, hash tables.

Also, the msg \"$chan -3Protection engaged- $banmask was unbanned -DiStUrBiRc v2.0-\" is umm... how do I put this politely....nevermind

lets just say just remove it, people can see $banmask being unbanned with the mode message, so its redundant,

 Respond  
Lindrian   -  Dec 23, 2006

It doesnt have that much of a revenge, might be good for some guys. And the \"message\" is just gay..\"msg $chan -3Protection engaged- $banmask was unbanned -DiStUrBiRc v2.0-
}\"

That part.. No need at all!

Otherwhize, its a good one if your not looking for any revenge at ALL. But it probably could have been made easier ;)

Nice job anyway.

 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.