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.

Executing Shell commands and relaying??

Old posts that have not been replied to for several years.
Locked
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Executing Shell commands and relaying??

Post by Gothic-Angel »

Ok Im having some problems relaying information..

I.e

I want to execute the command "vhosts" which is no problem, the problem is how can I notice the user the vhost's on multiple lines?

like 127.0.0.1 localhost
127.0.0.2 localhost2
127.0.03 localhost3

etc

Also havin the same problem when im trying to open a txt file with a "motd" a public command like !status to display whats in a text file but it stops displaying inforamation after a space.

Like

Code: Select all

set motdtxt "motd.txt" 
set fs [open $motdtxt r]
set motd [read $fs 256]
and motd.txt will contain "Hello this is just a test of reading froma file"
It will just display Hello

Im stuck here :(
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

Well I got the second half down, but I still dont know how to list the vhost's the problem was simple.

Code: Select all


set statustxt "status.txt"
set fs [open $statustxt r]
set stats [read $fs 256]
close $fs

proc pub:status {nick host hand chan arg} {
global stats
putserv "PRIVMSG $nick :$stats"
}
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

set vhosts [exec vhosts]
foreach line [split $vhosts "\n"] { puthelp "PRIVMSG $nick :$line" }

photon?
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

oh you have got to be kidding me..

I was like sooo close to having it right then heh
G
Gothic-Angel
Op
Posts: 109
Joined: Mon Sep 23, 2002 9:46 pm

Post by Gothic-Angel »

Thanks btw
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

you're very welcome
photon?
Locked