mIRC Home    About    Download    Register    News    Help

Print Thread
#133355 19/10/05 11:56 PM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Alright, I was wondering though I'm not for sure how.
When something, and there is no resolved address.. I would like it to echo the address that wasn't resolved, I tryed the several $DNS().nick/addr/ip (even without the props). But I still can't get it to echo the addr even if it wasn't resolved.

So for example here is just my code (just used mIRC's)

Code:
on *:DNS:{
  var %n = $dns(0)
  echo -a $timestamp $sides(/DNS:,6) Found %n addresses for [[ $+ $iif(!$dns(1).addr,$dns(1),$dns(1).addr) $+ ]]
  while (%n > 0) {
    echo -a $timestamp $sides(/DNS:,6) IP: $dns(%n).ip $iif($dns(%n).nick,NICK: $dns(%n).nick)
    dec %n
  }
}


Say I DNS'd something, it would return either:
Found N addresses for [ some.addr.com/ip ]

Say if it didn't resolve:
Found 0 addresses for [ ].

How can I get it to say
Found 0 addresses for [ the.adddr.or.ip.i.was.trying.to.resolve./ip ]

In mIRC help it says: "You can use $dns(0).nick/addr/ip to reference properties if an address couldn't be resolved."

I'm not for sure, but I even tryed all those and still returns $null.

Anyone got any ideas? Maybe make a new suggestion if this isn't possible for mIRC to return the address trying to be resolve if it couldn't be resolved? :|


Live to Dream & Dream for Life
#133356 20/10/05 03:06 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
If you are DNS'ing an IP, that returns 0 matches, you can use:
$dns(0).ip

If you are DNS'ing a Hostmask, that returns 0 matches, you can use:
$dns(0).addr


Edit:
Example:

Code:
on *:DNS:{
  var %n = $dns(0)
  if (%n == 0) { echo -a $timestamp Found %n addresses. [[ Address: $iif($dns(0).addr,$v1,Not Found) $+ , IP: $iif($dns(0).ip,$v1,Not Found) ]] }
  else { echo -a $timestamp $sides(/DNS:,6) Found %n addresses for [[ $+ $iif(!$dns(1).addr,$dns(1),$dns(1).addr) $+ ]] }
  while (%n > 0) {
    echo -a $timestamp $sides(/DNS:,6) IP: $dns(%n).ip $iif($dns(%n).nick,NICK: $dns(%n).nick)
    dec %n
  }
}

Last edited by Rand; 20/10/05 03:15 AM.
#133357 20/10/05 10:41 PM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Yay ;x


Live to Dream & Dream for Life

Link Copied to Clipboard