_Added in 1.9.0_ *$dns(N)* Returns the IP address that was resolved during a [[on DNS]] [[Scripting_Events|event]]. See also [[/dns]], [[on DNS]]. *Parameters* table(ktable). |*Parameter*|*Description*| | N | If N = 0, returns number of associated IP addresses, otherwise the Nth IP address. | *Properties* table(ktable). |*Property*|*Description*| | .nick | Returns the nick if [[/dns]] was used on a nick. | | .addr | Returns the resolved hostname. | | .ip | Returns the resolved Ip address. | *Example*
; Lookup a nick
/dns nick

; Lookup a hostname
/dns google.com

; Lookup a IP address.
/dns 8.8.8.8

; Print the results from the lookups.
on *:DNS:{
var %n = $dns(0)
 echo 4 Found %n addresses
 while (%n > 0) {
   echo 4 dns: $dns(%n) nick: $dns(%n).nick addr: $dns(%n).addr ip: $dns(%n).ip
   dec %n

 }
}