Project

General

Profile

Actions

$dns » History » Revision 1

Revision 1/4 | Next »
Per Amundsen, 08/11/2015 01:36 PM


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

 }
}

Updated by Per Amundsen over 9 years ago · 1 revisions

Also available in: PDF HTML TXT