All pastes #431740 Raw Edit

Something

public text v1 · immutable
·published 2007-04-09 21:24 UTC
rendered paste body
bind pub - !resolve c_lookup

proc showdns {ip host status chan} {
	if {$status == 1} {
		putserv "PRIVMSG $chan: Hostname: $host"
		putserv "PRIVMSG $chan: IP: $ip"
	} else {
		putserv "PRIVMSG $chan: Lookup not successful"
	}
}

proc c_lookup {nick userhost handle chan text} {
	if {[string length [lindex $text 0]] == 0} {
		putserv "PRIVMSG $chan: You MUST enter a hostname/IP!!!!"
		return 1
	}
		
	putserv "PRIVMSG $chan: Looking up [lindex $text 0]"
	dnslookup [lindex $text 0] showdns $chan
}