| View previous topic :: View next topic |
| Author |
Message |
p0rn0saurus Voice
Joined: 10 May 2006 Posts: 3
|
Posted: Wed May 10, 2006 12:21 am Post subject: need help with script lookup |
|
|
| I was wondering if anyone got a script that will do a shell command and return the value to the user. command such as !uptime, etc |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed May 10, 2006 12:46 am Post subject: |
|
|
many do; look around (hint: there is a 'Search' button above) _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
p0rn0saurus Voice
Joined: 10 May 2006 Posts: 3
|
Posted: Wed May 10, 2006 1:02 am Post subject: |
|
|
heh maybe i should go into details. i saw this nslookup script which is NOT written by me
| Code: | 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
}
}
| I know with putserv it gives name address etc but i was wondering how to spill everything. i know in unix when you do nslookup www.yahoo.com you get alot more info and i want all that info to send to the user instead of just 3 lines |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed May 10, 2006 1:07 am Post subject: |
|
|
nslookup doesn't provide info on host's online status, so the script you posted is irrelevant _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
p0rn0saurus Voice
Joined: 10 May 2006 Posts: 3
|
Posted: Wed May 10, 2006 1:14 am Post subject: |
|
|
im not sure what you are saying, in unix if i type nslookup www.yahoo.com i get the following,
nslookup www.yahoo.com
Server: localhost
Address: 127.0.0.1
Non-authoritative answer:
Name: www.yahoo.akadns.net
Addresses: 66.94.230.32, 66.94.230.36, 66.94.230.40, 66.94.230.46
66.94.230.37, 66.94.230.39, 66.94.230.48, 66.94.230.75
Aliases: www.yahoo.com
--------------------------------------------------------------------------------
with that script on irc, i would get the following
DNS Lookup: www.yahoo.akadns.net <-> 127.0.0.1 <-> 66.94.230.35, 66.94.230.50, 66.94.230.49, 66.94.230.32 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed May 10, 2006 1:17 am Post subject: |
|
|
since you're not sure what I'm saying, just trust me when I'm saying nslookup is irrelevant here _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|