07-22-2017, 00:32 +0200
AuthorPost
thommey  05-24-2005, 21:45   | [EGG] Dns Lookups (with variable-passing) Jabber
(Administrator)
Member since 03/2004
62 Posts
                                                                                                                              
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
bind pub - !dns dns
proc dns {nick host hand chan text} {
    set query $text
    dnslookup $query dns_callback $chan $nick $query
}
proc dns_callback {ip addr state chan nick query} {
    if {!$state} {
        putserv "PRIVMSG $chan :\002$nick\002, failed to look up \002$query\002"
        return
    }
    if {$query == $ip} {
        putserv "PRIVMSG $chan :\002$nick\002 $ip->$addr"
    } else {
        putserv "PRIVMSG $chan :\002$nick\002 $addr->$ip"
    }
}

This post was edited 1 times, last on 08-12-2009, 21:12 by thommey
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen