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.

FTP::Open

Old posts that have not been replied to for several years.
Locked
R
RavXB

FTP::Open

Post by RavXB »

if {[set ftpsock [ftp::open $server $user $passwd]] == -1} {
puts "Connection refused!"
exit 1
}


I get [23:24] Tcl error [pub_testftp]: invalid command name "ftp::open"


How should I fix?
R
RavXB

Post by RavXB »

I'm using Redhat linux btw.
R
RavXB

Post by RavXB »

I just installed the TCLLIB... still says invalid command though.. Any help would be appreciated.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Check for other error message when loading the bot, and or when you rehash.

It still sounds like TclLIB is not loaded.

Is this your own script, or a pre-made one by somebody?

If it's your own, you need to load the library.

Tcl has a package system, that is dynamic in nature, the same way as eggdrop modules.

Just like in eggdrop, you can compile all the modules, but you don't need to load them. In eggdrop you place a confil line, to cause the load procedure.

In Tcl you need a "package require" line, to import the library (be it a dynamic lib, or a Tcl script).

The TclLIB man page, shown the line required to load the FTP client portion.
R
RavXB

Post by RavXB »

Got it :) thanks!


One last question.. how can I issue a rawcommand with this TCLLIB ftp library?
R
RavXB

Post by RavXB »

nevermind got it!
R
RavXB

Post by RavXB »

When I issue:

ftp::Quote $conn $testes

$testes is surrounded by braces when issued on the ftp, but its not when I putserv testes into the channel.

Any ideas?

*edit* only when there is more then one word (e.g. if $testes = TEST, test would be issued with no races, if $testes = TEST TEST issue would be {TEST TEST}
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

We would have to see more of the script, but my guess is a list/string coversion issue.
Locked