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.

problem making tcl

Old posts that have not been replied to for several years.
Locked
T
Tiniduske

problem making tcl

Post by Tiniduske »

hey

i have sendftp.tcl and i want it to use it with a timer

# For example:
#
# sendftp /home/bill/stats.htm www.ms.com bill secret /bgates/WWW/stats.htm
# (local-file server user pass remote-file)

this come's out off the tcl
now i want to upload my statspage

i had made this:
proc sendftp {} {
exec sendftp /home/linuxke/eggdrop/stats/vlgstats.html users.pandora.be user paswoord /stats/vlgstats.html
timer 30 sendftp
}
it give's no errors but it does nothing to :p
i have searched in the forum but i cant find a good explanetion
i'm a newbie in tcl-scripting (thats my biggest problem i think :p)
so if someone knows what i have to set in the tcl i realy would apriciat it
(and yes my english is crappy :p i'm from belgium and speak dutch :p)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

sendftp is not a shell script, and as such, you don't use the exec command.

The exec command is used to launch and return the data from a application on the server.

This is a Tcl script, and as such, provides a new Tcl command.

As you posted in the message, it has come straight fromt he top of sendftp.tcl. You should use a it as such.

First place the sendftp.tcl in your script directory. Edit your config file, and load it like a normal Tcl script.

You can then simply use the command as you have posted, but without the xec part.
T
Tiniduske

Post by Tiniduske »

it is loaded in the config file off my eggdrop
source scripts/sendftp.tcl with others words

and without the exec, it doesn't work to
but it can work because in the tcl (chanstats.tcl) off the same writer
it works but that stats isen't what i want, it's not that nice
but i can't get that part out of it
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I have just noticed why this is happening.

You are overwritting the sendftp command.

In the example code you gave above, you have created a sendftp command, which you are calling to send the file.

This is overwritting the sendftp command you need to use to realy send the file.
Locked