mIRC Home    About    Download    Register    News    Help

Print Thread
#43338 21/08/03 12:53 PM
Joined: Dec 2002
Posts: 117
R
Rich Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
From the help file: (last line of on DNS)
You can use $dns(0).nick/addr/ip to reference properties if an address couldn't be resolved.

Now I put this in my first loaded remote script:
on *:DNS:echo -s $dns(0) * $dns(0).ip * $dns(0).addr * $dns(0).nick * | halt

And I typed this in my status window:
/!dns 0.0.0.1

It echoed this:
[14:46:58] * Looking up 0.0.0.1
0 * * * *


Instead of this:
[14:46:58] * Looking up 0.0.0.1
0 * 0.0.0.1] * * *


If I turn my remotes of it echoes this:
[14:51:35] * Looking up 0.0.0.1
[14:51:40] * Unable to resolve 0.0.0.1


I think this is a bug, since $dns(0).ip should return 0.0.0.1


$input(Me like stars, You too?)
#43339 21/08/03 03:09 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yeah $dns(0) doesn't work well, what I use in my script is:

Code:
if ($dns(0) == 0) {
  if ($dns(0).nick && !$iaddress && !$dns(0).addr) {
    .echo $color(info) -ts * /dns: no such user $dns(0).nick
    halt
  }
  echo $color(other) -ts * Unable to resolve $iif($iaddress,$iaddress,$dns(0).addr)
}


That seems to work perfectly.

#43340 23/08/03 01:22 PM
Joined: Dec 2002
Posts: 117
R
Rich Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
Thanks, $iaddress is removed from the help file so I didn't think about it.


$input(Me like stars, You too?)

Link Copied to Clipboard