On dns: Difference between revisions
Jump to navigation
Jump to search
m Created page with "The on DNS event triggers when a /dns query either succeeds or fails. on <level>:DNS:<commands> '''Note''' that this will also be triggered if you try to /dns a nicknam..." |
(No difference)
|
Revision as of 18:06, 22 February 2011
The on DNS event triggers when a /dns query either succeeds or fails.
on <level>:DNS:<commands>
Note that this will also be triggered if you try to /dns a nickname, and the nickname is not on IRC.
$address in this context is the address or IP which was queried to be resolved.
Examples
On *:Dns: {
echo -ag Found $dns(0) addresses for $address ( $+ $raddress $+ )!
var %x = 1
while ($dns(%x)) {
echo -ag DNS Resolve %x Address = $dns(%x).addr ; IP = $dns(%x).ip
inc %x
}
}
This will echo all the resolved addresses.