|
Joined: Sep 2004
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2004
Posts: 44 |
Hi, i came across this script, and was wondering, maybe if yall could take a look at it. here it is.
on *:NICK: { inc -u10 $+(%,nickflood,.,$address) var %chan = #channel,#channel if (!$($+(%,nickflood,.,w,.,$address),2)) { if ($($+(%,nickflood,.,$address),2) >= 3) { set $+(%,nickflood,.,w,.,$address) 1 msg %chan $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. } } else { if ($newnick ison %chan) && ($me isop %chan) { kick %chan $newnick Excessive Nick Change! unset $+(%,nickflood,.,w,.,$address) } } }
on *:START: .unset %nickflood*
it works and everything, but it picks up on every room im in, when i just need it to work in only 2 of the rooms, any ideas? Thanks In Advance
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
on *:START: .unset %nickflood.*
on *:NICK: {
[color:blue]var %chan = #channel1,#channel2[/color]
if ( (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2)) || (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2)) ) {
inc -u10 $+(%,nickflood.,$address)
if ($($+(%,nickflood.,$address),2) = 3) {
if (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2)) { msg $v2 $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. }
if (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2)) { msg $v2 $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. }
}
elseif ($($+(%,nickflood.,$address),2) > 3) {
if (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2)) { kick $v2 $newnick Excessive Nick Change! }
if (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2)) { kick $v2 $newnick Excessive Nick Change! }
}
}
} try that note the blue line you need to put ya channels on it. * untested
|
|
|
|
Joined: Sep 2004
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2004
Posts: 44 |
works great , thanks 1 question tho, how would i give exceptions for ops? so it doesnt kick the ops
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
on *:START: .unset %nickflood.*
on *:NICK: {
[color:blue]var %chan = #channel1,#channel2[/color]
if ( (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2) && ($newnick !isop $v2)) || (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2) && ($newnick !isop $v2)) ) {
inc -u10 $+(%,nickflood.,$address)
if ($($+(%,nickflood.,$address),2) = 3) {
if (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2) && ($newnick !isop $v2)) { msg $v2 $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. }
if (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2) && ($newnick !isop $v2)) { msg $v2 $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. }
}
elseif ($($+(%,nickflood.,$address),2) > 3) {
if (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2) && ($newnick !isop $v2)) { kick $v2 $newnick Excessive Nick Change! }
if (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2) && ($newnick !isop $v2)) { kick $v2 $newnick Excessive Nick Change! }
}
}
} ^ that well ignore them if there an op but well kick em from the other channel if they are not an op on *:START: .unset %nickflood.*
on *:NICK: {
[color:blue]var %chan = #channel1,#channel2[/color]
if ( (($newnick !isop $gettok(%chan,1,44)) && ($newnick !isop $gettok(%chan,2,44))) && ( (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2)) || (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2)) ) ) {
inc -u10 $+(%,nickflood.,$address)
if ($($+(%,nickflood.,$address),2) = 3) {
if (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2)) { msg $v2 $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. }
if (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2)) { msg $v2 $newnick Excessive Nick Change will NOT be Tolerated! This is your First & Last Warning. }
}
elseif ($($+(%,nickflood.,$address),2) > 3) {
if (($newnick ison $gettok(%chan,1,44)) && ($me isop $v2)) { kick $v2 $newnick Excessive Nick Change! }
if (($newnick ison $gettok(%chan,2,44)) && ($me isop $v2)) { kick $v2 $newnick Excessive Nick Change! }
}
}
} ^ that well ignore them if there an op on ether channel * again untested
|
|
|
|
Joined: Sep 2004
Posts: 44
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2004
Posts: 44 |
seems to work thanks alot
|
|
|
|
Joined: May 2005
Posts: 1
Mostly harmless
|
Mostly harmless
Joined: May 2005
Posts: 1 |
where do you post this code?
A dog may be a man's best friend, but a horse is a woman's.
-ashley-
|
|
|
|
|