mIRC Home    About    Download    Register    News    Help

Print Thread
bad host - protection script #17914 03/04/03 01:16 PM
Joined: Dec 2002
Posts: 10
H
hoaxer Offline OP
Pikka bird
OP Offline
Pikka bird
H
Joined: Dec 2002
Posts: 10
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

Re: bad host - protection script #17915 03/04/03 01:44 PM
Joined: Dec 2002
Posts: 10
H
hoaxer Offline OP
Pikka bird
OP Offline
Pikka bird
H
Joined: Dec 2002
Posts: 10
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

Last edited by hoaxer; 03/04/03 01:44 PM.
Re: bad host - protection script #17916 03/04/03 01:51 PM
Joined: Dec 2002
Posts: 395
M
MonoSex Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
$read(badhosts.txt) reads a random line from that file..

Re: bad host - protection script #17917 03/04/03 02:00 PM
Joined: Dec 2002
Posts: 10
H
hoaxer Offline OP
Pikka bird
OP Offline
Pikka bird
H
Joined: Dec 2002
Posts: 10
So it not checks every line ... hmz

Re: bad host - protection script #17918 03/04/03 02:03 PM
Joined: Dec 2002
Posts: 10
H
hoaxer Offline OP
Pikka bird
OP Offline
Pikka bird
H
Joined: Dec 2002
Posts: 10
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

Last edited by hoaxer; 03/04/03 02:04 PM.
Re: bad host - protection script #17919 03/04/03 02:29 PM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
if ($read(badhosts.txt,w,$address($nick,4)) ) { mode $chan +b $address($nick,4) | kick $chan $nick }

Re: bad host - protection script #17920 04/04/03 09:20 AM
Joined: Dec 2002
Posts: 143
A
Aubs Offline
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
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


Aubs.
cool