This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

nslookup bug

Old posts that have not been replied to for several years.
Locked
User avatar
jsilvestre
Voice
Posts: 20
Joined: Sat Mar 05, 2005 6:02 am
Location: Lisbon, Portugal

nslookup bug

Post by jsilvestre »

Code: Select all

bind pub - !nsl pub_nslookup
bind msg - !nsl msg_nslookup
bind pub - !dns pub_nslookup
bind msg - !dns msg_nslookup
bind pub - !nslookup pub_nslookup
bind msg - !nslookup msg_nslookup

proc pub_nslookup {nick uhost hand chan 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]
    }
  }
  catch {close $input}
  if {![info exists name]} {
    putserv "PRIVMSG $chan :DNS Lookup: Unable to resolve address."
    return 0
  }
  if {$name != ""} {
    putserv "PRIVMSG $chan :DNS Lookup: $name <-> $address"
    return 0
  } else {
    putserv "PRIVMSG $chan :DNS Lookup: Unable to resolve address."
    return 0
  }
} 


Code: Select all

[14:59] <teste> [16:01] Tcl error [pub_nslookup]: can't read "nsl_path": no such variable

Code: Select all

[15:00] <made_of_storm> .set errorInfo
[15:00] <teste> [16:03] tcl: builtin dcc call: *dcc:set made_of_storm 9 errorInfo
[15:00] <teste> [16:03] #made_of_storm# set errorInfo
[15:00] <teste> Currently: can't read "nsl_path": no such variable
[15:00] <teste> Currently:     while executing
[15:00] <teste> Currently: "open "|$nsl_path $arg" r"
[15:00] <teste> Currently:     (procedure "pub_nslookup" line 3)
[15:00] <teste> Currently:     invoked from within
[15:00] <teste> Currently: "pub_nslookup $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
Best Regards

José Eduardo Silvestre
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

then set the variable ><
are triing to make a fool out of you?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked