Skip to content
MSN

Long Nick Flood Prot......

A TG007 community discussion started by UAE_Boy.

Discussion 33 posts
Page 2 of 2
Open
Topic #2678 · 33 published posts · 2,140 views

Put this under if ($2 == join) and it should work fine.

i go by jesse aka barqs, you can fine me in %#Barqs

if your still having problems.

 

if ($len($1) >= 50) {

sockwrite -n $sockname ACCESS $mid($4,2) ADD DENY $+($str(?,50),*!*@*.*.*.*) 0 :long nickname ban

sockwrite -n $sockname KICK $mid($4,2) $mid($gettok($1,1,33),2) long $+ $chr(160) $+ nickname $+ $chr(160) $+ kick

}

Or just pm me on here..

Jesse thanx for the reply but im a newbie adn was wondering if u ment to add it under ($2 == join) right into the vincula?

Yes, Thats what i mean.. sorry

np thanx . ill give it a try

 

Jesse thanx but i tried to add that bit to my vincula but now all my script does is kick everyone saying they have long nicks.Was there something i shoulda removed from vincula when i added this to it maybe?This is how my vin looks now maybe u can see what i did wrong.Thanx again for ur time

 

 

elseif ($2 == JOIN) {

if ($len($1) >= 50) {

sockwrite -n $sockname ACCESS $mid($4,2) ADD DENY $+($str(?,50),*!*@*.*.*.*) 0 :long nickname ban

sockwrite -n $sockname KICK $mid($4,2) $mid($gettok($1,1,33),2) long $+ $chr(160) $+ nickname $+ $chr(160) $+ kick

}

if ($scid($gettok($sockname,3,46)).me !ison $chr(37) $+ $chr(35) $+ $right($right($gettok(%read,4,32),-3),88)) {

msn.set $sockname fullroom $right($gettok(%read,4,32),-1)

msn.set $sockname room $chr(37) $+ $chr(35) $+ $right($right($gettok(%read,4,32),-3),88)

msn.set $sockname shortroom $left($chr(37) $+ $chr(35) $+ $right($right($gettok(%read,4,32),-3),88),60)

tokenize 32 $reptok(%read,$gettok(%read,4,32),: $+ $chr(37) $+ $chr(35) $+ $right($right($gettok(%read,4,32),-3),88),1,32)

 

 

what jesse suggested will work but he forgot something important... $1 in the sockread is not just the nickname, but the : in front of the nickname and the gatekeeper address too.

 

change the first part of the code to

 

if ($len($1) > 87) { ...

 

and it will work properly.

bfush.PNG

not 87, im sure he isn't going be to kicking nicknames over 87 chrs..

it should be at 50 seeing thats what hes trying to stop.

change

 

if ($len($1) >= 50) {

 

to

 

if ($len($gettok($gettok($1,1,33),1,58)) >= 50) {

 

and it will work fine

if ($len($gettok($gettok($1,1,33),1,58)) >= 50) {
sockwrite -n $sockname ACCESS $mid($4,2) ADD DENY $+($str(?,50),*!*@*.*.*.*) 0 :long nickname ban
sockwrite -n $sockname KICK $mid($4,2) $mid($gettok($1,1,33),2) long $+ $chr(160) $+ nickname $+ $chr(160) $+ kick 
}

Edited Feb 3, 2005 6:27 AM by OZZY_10â„¢

My code does NOT have bugs. It just develops random features.

Thanx ozzy and jesse adn everyone else that helped wiht ozzys last suggestion i finally got it to work.But now it seems to dc after 4 long nicks join is there anyway to get it to stop dcing ? i have already played around wiht my flood settings in options and tried a few diff setting to no avail so i was kinda hoping maybe someone had another idea on how to get it to stop from dcing

use this. the extra 37 characters are the gatekeeperid so don't ask why it is 87.

 

 if ($len($1) >= 87) sockwrite -n $sockname ACCESS $mid($4,2) ADD DENY $+($str(?,50),*!*@*$*) 0 :long nickname ban $crlf KICK $mid($4,2) $mid($gettok($1,1,33),2) :long nickname kick 

 

also sockwrites sometimes have a tendency of making the bot disconnect more easily than normal operations do, but on the up side they are faster than normal operations. This should work good because it is 1 sockwrite command and it has been tested. It is also faster because there are less operations in the if statement.

Edited Feb 3, 2005 7:50 AM by The Gate Keeper

gate he allready said the code i said works.

 

try this

if ($len($gettok($gettok($1,1,33),1,58)) >= 50) {
sockwrite -n $sockname ACCESS $mid($4,2) ADD DENY $+($str(?,50),*!*@*.*.*.*) 0 :long nick $lf KICK $mid($4,2) $mid($gettok($1,1,33),2) : $+ long nick 
}

Edited Feb 3, 2005 4:27 PM by OZZY_10â„¢

My code does NOT have bugs. It just develops random features.

hmmm well thanx guys but im still haveing same dc prob.but it only happens with these darn long nicks i can stay in a room all day with anyother kind of flooding and dont dc but this damn things are killing me lol well thanx for all ur help anyways.