Easy Ban Protection

By Neo_Reloaded on Aug 31, 2006

A simple yet powerful ban protection script I've made. Look in the nicklist for the add/delete commands. Also, if the person has ban protection enabled it will counter it. Also unbans you using chanserv.

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 -NeOiRc 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.
fire_wizard1   -  Dec 15, 2008

i agree with krimson, you dont need all those protection modes and unprotection modes, i just say that its all un-needed work, and its not simple like you said lol

 Respond  
Disturbed   -  Dec 09, 2006

dork <.<

 Respond  
Master Smiley   -  Nov 26, 2006

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

????

 Respond  
Master Smiley   -  Nov 26, 2006

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

 Respond  
Neo_Reloaded   -  Sep 01, 2006

good idea, krimson :). i\'ll update it.

 Respond  
krimson   -  Aug 31, 2006

those protect and unprotect aliases are not so pretty. i would suggest using only one hostmask for protection (something like *!ident@host) and use wildcard matches to compensate for the other hostmask types

 Respond  
Neo_Reloaded   -  Aug 31, 2006

fixed the bug where you kick yourself.

 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.