Project

General

Profile

On DNS » History » Version 4

Per Amundsen, 11/16/2015 04:23 AM

1 2 Per Amundsen
_Added in 1.9.0_
2 1 Per Amundsen
3
*<notextile>on <level>:DNS:<commands></notextile>*
4
5
Triggers when a [[/dns]] query either succeeds or fails.
6
7 4 Per Amundsen
_See also [[$dns]], [[/dns]]._
8 1 Per Amundsen
9
*Parameters*
10
11
<level> - The level for the event to trigger.
12
<commands> - The commands to be performed when the event listener's criteria is met.
13
14
*Example*
15
16
<pre>
17
; Lookup a IP address.
18
/dns 8.8.8.8
19
20
; Listen to the DNS event and print the results from the lookups.
21
on *:DNS:{
22
var %n = $dns(0)
23
 echo 4 Found %n addresses
24
 while (%n > 0) {
25
   echo 4 dns: $dns(%n) nick: $dns(%n).nick addr: $dns(%n).addr ip: $dns(%n).ip
26
   dec %n
27
 }
28
}
29
</pre>