Added in 1.9.0
$dns(N)
Returns the IP address that was resolved during a on DNS event.
Parameters
N - If N = 0, returns number of associated IP addresses, otherwise the Nth IP address.
Properties
.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
}
}