Code: Select all
tag when posting logs, code
Code: Select all
proc msg_nslookup {nick uhost hand arg} {
global nsl_path
set input [open "|$nsl_path $arg" r]
while {![eof $input]} {
catch {set contents [gets $input]}
if {[string first "Name:" $contents] >= 0} {
set name [string range $contents 9 end]
}
if {[string first "Address:" $contents] >= 0} {
set address [string range $contents 10 end]
}
if {[string first "Addresses:" $contents] >= 0} {
set addresses [string range $contents 12 end]
}
}
catch {close $input}
if {$address == "127.0.0.1"} {
putserv "PRIVMSG $nick :DNS Lookup: $name <-> $address <-> $addresses"
return 0
} else {
putserv "PRIVMSG $nick :DNS Lookup: $name <-> $address"
return 0
}
}
Code: Select all
tag when posting logs, code
Code: Select all
tag when posting logs, code