On dns
From Scriptwiki
Revision as of 19:06, 22 February 2011 by NaNg (talk | contribs) (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...")
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.