FoF's Adv. Protection Script for mIRCBy: FoF
Last Modified: Nov 19 4:33pm (r8)

This script was originally based off Orios protection script. It has since been heavily modified to protect me on another network and to have differnt levels of response. Mine adds the ability to also protect yourself when you lose +q.
Note: You will need to change the password in the three nickserv settings to your password.
Note 2: There are two notes for the new kick part of the script in the homicidial section.
1. You need to be running something that changes the way the IAL(Internal address list works) or you need to be sharing a channel (other then the one you were kicked from) to be able to ban them.
2. If he ban doesnt work change the 250 (10 lines down) to something higher like 500 or 750.
r1-6: I don't remember. >_<
r7-8: New kick code thanks to Orionis
Note: You will need to change the password in the three nickserv settings to your password.
Note 2: There are two notes for the new kick part of the script in the homicidial section.
1. You need to be running something that changes the way the IAL(Internal address list works) or you need to be sharing a channel (other then the one you were kicked from) to be able to ban them.
2. If he ban doesnt work change the 250 (10 lines down) to something higher like 500 or 750.
r1-6: I don't remember. >_<
r7-8: New kick code thanks to Orionis

;############ Protection ##############
menu menubar {
Protection
.$iif( $group(#Passive) == on,$style(1)) Passive {
.enable #passive
if ( $group(#Agressive) == on ) {
.disable #Agressive
}
if ( $group(#Homicidal) == on ) {
. disable #Homicidal
}
echo -at Passive Protection Enabled
}
.$iif( $group(#Agressive) == on,$style(1)) Agressive {
.enable #Agressive
if ( $group(#Passive) == on ) {
.disable #Passive
}
if ( $group(#Homicidal) == on ) {
.disable #Homicidal
}
echo -at Agressive Protection Enabled
}
.$iif( $group(#Homicidal) == on,$style(1)) Homicidal {
.enable #Homicidal
if ( $group(#Passive) == on ) {
.disable #Passive
}
if ( $group(#Agressive) == on ) {
.disable #Agressive
}
echo -at Homicidal Protection Enabled
}
.$iif(($group(#Homicidal) == off) && ($group(#Agressive) == off) && ($group(#Passive) == off),$style(1)) Off {
if ( $group(#Passive) == on ) {
.disable #Passive
}
if ( $group(#Agressive) == on ) {
.disable #Agressive
}
if ( $group(#Homicidal) == on ) {
.disable #Homicidal
}
echo -at 1,8!4,8W1,8A4,8R1,8N4,8I1,8N4,8G1,8! Protection Disabled 1,8!4,8W1,8A4,8R1,8N4,8I1,8N4,8G1,8!
}
}
on *:INVITE:#: {
if ( $nick == ChanServ ) {
join $chan
}
}
on *:JOIN:*: {
if ( $nick == $me ) && ( $chan != #bOPs ) && ( $chan != #bbz ) {
mode $chan +b
.timer $+ $chan 1 2 bancheck $chan
}
}
alias bancheck {
if ( $chan($1).ibl = $true ) {
var %c = 1
while ( %c <= $ibl( $1,0 ) ) {
var %w = $ibl($1,%c)
if ( %w iswm ~r: $+ $fullname ) {
mode $1 -b %w
}
if ( ~c: isin %w ) {
if ( $right( %w,-3 ) ischan ) {
mode $1 -b %w
}
}
if ( %w iswm $address( $me,5 ) ) {
mode $1 -b %w
}
inc %c
}
else { halt }
}
}
#Passive off
on *:KICK:*: {
if ($knick == $me) {
cs invite $chan
}
}
on *:RAWMODE:#: {
if ( *-*q* iswm $1 ) && ( $me isin $2- ) {
nickserv identify password
}
if ( *-*a* iswm $1 ) && ( $me isin $2- ) {
chanserv protect $chan $me
}
if ( *-*o* iswm $1 ) && ( $me isin $2- ) {
cs op $chan
}
if (*-*h* iswm $1) && ( $me isin $2- ) {
chanserv halfop $chan $me
}
if (*-*v* iswm $1) && ( $me isin $2- ) {
cs voice $chan $me
}
if (*+*b* iswm $1) {
var %b = 1
while (%b <= $numtok($2-,32)) {
var %q = $gettok($2-,%b,32)
if (%q iswm ~r: $+ $fullname) {
mode $chan -b %q
}
if (~c: isin %q) {
if ($right(%q,-3) ischan) {
mode $chan -b %q
}
}
if (%q iswm $address($me,5)) {
mode $chan -b %q
}
inc %b
}
}
}
#Passive End
#Agressive off
on *:KICK:*: {
if ($knick == $me) {
if ($nick == ChanServ) {
var %tempnick = $gettok($rawmsg,7,32)
}
else {
var %tempnick = $nick
}
cs invite $chan
cs kick $chan %tempnick Don't kick me
}
}
on *:RAWMODE:#: {
if ( *-*q* iswm $1 ) && ( $me isin $2- ) {
nickserv identify password
mode $chan -q $nick
}
if ( *-*a* iswm $1 ) && ( $me isin $2- ) {
cs protect $chan $me
cs deprotect $chan $nick
}
if ( *-*o* iswm $1 ) && ( $me isin $2- ) {
cs op $chan $me
cs deop $chan $nick
}
if (*-*h* iswm $1) && ( $me isin $2- ) {
cs halfop $chan $me
cs dehalfop $chan $nick
}
if (*-*v* iswm $1) && ( $me isin $2- ) {
cs voice $chan $me
cs devoice $chan $nick
}
if (*+*b* iswm $1) {
var %b = 1
while (%b <= $numtok($2-,32)) {
var %q = $gettok($2-,%b,32)
if (%q iswm ~r: $+ $fullname) {
mode $chan -b %q
cs deop $chan $nick
cs deprotect $chan $nick
}
if (~c: isin %q) {
if ($right(%q,-3) ischan) {
mode $chan -b %q
cs deop $chan $nick
cs deprotect $chan $nick
}
}
if (%q iswm $address($me,5)) {
mode $chan -b %q
cs unban $chan
cs deop $chan $nick
cs deprotect $chan $nick
}
inc %b
}
}
}
#Agressive End
#Homicidal off
;### There are two notes for the new kick script
;### 1. You need to be running something that changes the way the IAL(Internal address list works) or you need to be sharing a channel (other then the one you were kicked from) to be able to ban them.
;### 2. If he ban doesnt work change the 250 (10 lines down) to something higher like 500 or 750. Keep changing until it works.
on *:KICK:*: {
if ($knick == $me) {
if ($nick == ChanServ) {
var %tempnick = $gettok($rawmsg,7,32)
}
else {
var %tempnick = $nick
}
cs invite $chan
timer $+ %tempnick $+ $chan -m 1 250 ban $address( %tempnick , 2 )
cs kick $chan %tempnick Don't kick me
}
}
on *:RAWMODE:#: {
if ( *-*q* iswm $1 ) && ( $me isin $2- ) {
nickserv identify password
mode $chan -q $nick
cs kick $chan $nick
}
if ( *-*a* iswm $1 ) && ( $me isin $2- ) {
cs protect $chan $me
cs deprotect $chan $nick
cs kick $chan $nick
}
if ( *-*o* iswm $1 ) && ( $me isin $2- ) {
cs op $chan $me
cs deop $chan $nick
cs kick $chan $nick
}
if (*-*h* iswm $1) && ( $me isin $2- ) {
chanserv halfop $chan $me
cs dehalfop $chan $nick
timer 1 5 cs dehalfop $chan $nick
}
if (*-*v* iswm $1) && ( $me isin $2- ) {
cs voice $chan $me
cs devoice $chan $nick
timer 1 5 cs devoice $chan $nick
}
if (*+*b* iswm $1) {
if ( $network == Utonet ) {
var %b = 1
while (%b <= $numtok($2-,32)) {
var %q = $gettok($2-,%b,32)
if (%q iswm ~r: $+ $fullname) {
mode $chan -b %q
cs deop $chan $nick
cs deprotect $chan $nick
mode $chan +b $address($nick,4)
cs kick $chan $nick Homicidal Defence
}
if (~c: isin %q) {
if ($right(%q,-3) ischan) {
mode $chan -b %q
cs deop $chan $nick
cs deprotect $chan $nick
mode $chan +b $address($nick,4)
cs kick $chan $nick Homicidal Defence
}
}
if (%q iswm $address($me,5)) {
mode $chan -b %q
cs unban $chan
cs deop $chan $nick
cs deprotect $chan $nick
mode $chan +b $address($nick,4)
cs kick $chan $nick Homicidal Defence
}
inc %b
}
}
}
}
#Homicidal End
;############ End Protection ############## |

Comments