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.

need help with script lookup

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
p
p0rn0saurus
Voice
Posts: 3
Joined: Wed May 10, 2006 12:14 am

need help with script lookup

Post by p0rn0saurus »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
p
p0rn0saurus
Voice
Posts: 3
Joined: Wed May 10, 2006 12:14 am

Post by p0rn0saurus »

heh maybe i should go into details. i saw this nslookup script which is NOT written by me

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
		}
	}
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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
p
p0rn0saurus
Voice
Posts: 3
Joined: Wed May 10, 2006 12:14 am

Post by p0rn0saurus »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
Post Reply