mIRC Home    About    Download    Register    News    Help

Print Thread
DNS-IP #85142 03/06/04 05:06 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
have some problems in knowledge :P

i want to do this:
when /dns is trigered, IP is stored in %userip so i have this:

on *:DNS:{
if ($dns(0).ip) {
.set %userip $dns(0).ip
}
}

but sux when someone already has [email]id@number[/email]
it returnes host and what sux too nothing is stored in %userip smirk
any way to always store just number (ip) ?

Last edited by bunar; 03/06/04 05:07 PM.
Re: DNS-IP #85143 03/06/04 05:13 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Try using $dns(1).ip

Re: DNS-IP #85144 03/06/04 05:20 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
same effect, reverses ip to host, nothing stored in %userip

Re: DNS-IP #85145 03/06/04 05:28 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
on *:DNS:set -su %userip $dns(1).ip

/dns ww[/b]w.microsoft.com
* Set %userip to 207.46.156.252

/dns 207.46.134.221
* Set %userip to 207.46.134.221

Re: DNS-IP #85146 03/06/04 05:33 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
doesnt work smirk
maybe coz i already have dns script but i dont think it should crossover with something do you?

code:

ON *:DNS:{
if ($dns(0) == 0) {

echo $color(other) -ts Unable to resolve $iif($iaddress,$iaddress,$dns(0).addr)
}
else {
var %numhosts $dns(0), %host = 0
var %hosts
while (%host < %numhosts) {
inc %host 1
set %hosts %hosts $iif($dns(1) == $dns(1).ip,$dns(%host).addr $+([,$ccode($dns(%host).addr),]),$dns(%host).ip) $+ $chr(44)
}
echo $color(other) -ts Resolved $dns(1) to $left(%hosts,$calc($len(%hosts)-1))
}
halt
}



(c) by codemastr

Last edited by bunar; 03/06/04 05:38 PM.
Re: DNS-IP #85147 03/06/04 05:42 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well, it will if they are in the same file.

That snip didn't conflict with my own dns code in a different file.

Re: DNS-IP #85148 03/06/04 05:49 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
hee, it works perfect now =)
and again, i thank you very very much !