Project

General

Profile

Actions

On DNS » History » Revision 2

« Previous | Revision 2/5 (diff) | Next »
Per Amundsen, 11/14/2015 06:26 AM


Added in 1.9.0

on <level>:DNS:<commands>

Triggers when a /dns query either succeeds or fails.

See also $dns /dns.

Parameters

<level> - The level for the event to trigger.
<commands> - The commands to be performed when the event listener's criteria is met.

Example

; Lookup a IP address.
/dns 8.8.8.8

; Listen to the DNS event and 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 about 9 years ago · 2 revisions

Also available in: PDF HTML TXT