Project

General

Profile

On DNS » History » Revision 4

Revision 3 (Per Amundsen, 11/14/2015 06:27 AM) → Revision 4/5 (Per Amundsen, 11/16/2015 04:23 AM)

_Added in 1.9.0_ 

 *<notextile>on <level>:DNS:<commands></notextile>* 

 Triggers when a [[/dns]] query either succeeds or fails. 

 _See See also [[$dns]], [[/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* 

 <pre> 
 ; 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 
  } 
 } 
 </pre>