File: dns

package info (click to toggle)
epic4 1%3A3.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,756 kB
  • sloc: ansic: 56,285; makefile: 631; sh: 161; perl: 30
file content (29 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# dns.irc - translates ip->host, host->ip or nick->ip, nick->host.
# 
# quick hack by SrfRoG (srfrog@mistik.net)
#

alias dns.result (adr) {
        @ :res = convert($adr)
        echo *** $adr is ${res?res:[Unknown]}
}

alias dns {
        if (@) {
                ^local who $0
                if (match(*.* $who)) {
                        dns.result $who
                }{
                        userhost $who -cmd if ([$3]!=[<UNKNOWN>]) {
                                dns.result $4
                        }{
                                echo *** $who\: nick not found.
                        }
                }
        }{
                echo *** usage: /dns < nick | [host | ip address] >
        }
}

#srfrog'99