mIRC Homepage
Posted By: hoaxer bad host - protection script - 03/04/03 01:16 PM
on *:join:#:{
if ( $address($nick,4) == $read(badhosts.txt) ) { kick $chan $nick Bad Host }
else { mode $chan +v $nick }
}


Is wrong ... but I don't see where it goes wrong ... the syntax is correct I think ...

If a user joins, and his host is in the badhosts.txt he should be kicked ... that's what I'm trying to do smile
Posted By: hoaxer Re: bad host - protection script - 03/04/03 01:44 PM
on *:join:#:{
if ( $address($nick,4) == $read("badhosts.txt") ) { kick $chan $nick Bad Host }
else { mode $chan +v $nick }
}

works fine smile

" " was needed ...

of course you can do better a ban ... if autorejoins is on your bot starts flipping cool
Posted By: MonoSex Re: bad host - protection script - 03/04/03 01:51 PM
$read(badhosts.txt) reads a random line from that file..
Posted By: hoaxer Re: bad host - protection script - 03/04/03 02:00 PM
So it not checks every line ... hmz
Posted By: hoaxer Re: bad host - protection script - 03/04/03 02:03 PM
on *:join:#:{
if ( $address($nick,4) == $read(badhosts.txt,s,$address($nick,4)) ) { mode $chan +b $address($nick,4) | kick $chan $nick }
else { mode $chan +v $nick }
}

But now it do nothing frown
Posted By: Nobodi Re: bad host - protection script - 03/04/03 02:29 PM
if ($read(badhosts.txt,w,$address($nick,4)) ) { mode $chan +b $address($nick,4) | kick $chan $nick }
Posted By: Aubs Re: bad host - protection script - 04/04/03 09:20 AM
I'm sure I've tried that before, and you need to make the address into a wildcard string, with *'s at both ends of the address
*!*@*.host*

so you would use:

if ($read(badhosts.txt,w,$+($address($nick,4),*)) ) { mode $chan +b $address($nick,4) | kick $chan $nick }

Don't know if it is right, but something I'm sur eI remember from past scripting...

wink
© mIRC Discussion Forums