mIRC Home    About    Download    Register    News    Help

Print Thread
#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

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.
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
$read(badhosts.txt) reads a random line from that file..

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

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.
Joined: Dec 2002
Posts: 191
N
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 }

Joined: Dec 2002
Posts: 143
A
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


Link Copied to Clipboard