| View previous topic :: View next topic |
| Author |
Message |
Venus Voice
Joined: 10 Mar 2005 Posts: 3 Location: Washington
|
Posted: Thu Mar 10, 2005 7:11 pm Post subject: ChanStats FTP and Passive mode |
|
|
Greetings.
I am still getting used to the syntax for tcl scripting so I am hoping for a quick response for what I think is easy but I don't know how to fix.
My problem is I am using Chanstats 3.1.2 and it will not upload my file to an ftp. I belive the problem is it needs to be in passive mode. I have looked on the forum for setting passive mode but the most I can find is to set -mode passive. It dosnt say where to set this and certainly is not pretaining to ChanStats.
So could someone tell me what line to set passive mode on? I belive it is in these lines but I am not sure.
| Code: |
set ftpid [open "|$cs(ftpclient) -n $cs(ftpname) $cs(ftpport) " w]
puts $ftpid "user $cs(username) $cs(password)"
foreach a $ullist {
if {[file exists $a]} {
puts $ftpid "put $a $cs(ftpfolder)[lindex [split $a "/"] end]"
} else {putlog "CHATstats: Skipped uploading $a, file not found."}
}
|
Anyone with experience with ChanStats that could help me figure out how to set it to passive? I would truely apreciate any help in this matter.
Venus _________________ I don't think I am evil, I know I am. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Mar 10, 2005 10:57 pm Post subject: |
|
|
| Code: |
puts $ftpid "passive"
|
|
|
| Back to top |
|
 |
Venus Voice
Joined: 10 Mar 2005 Posts: 3 Location: Washington
|
Posted: Fri Mar 18, 2005 9:14 pm Post subject: |
|
|
Where do I put this? I tried putting it above or below the other puts lines and it still does not work. _________________ I don't think I am evil, I know I am. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Mar 18, 2005 10:33 pm Post subject: |
|
|
my FTP clients use passive directly before they initiate the file transfer in your case before the PORT command. since you are using an 3rd party ftp client I suggest you to refer its man page to get the argument for using passive mode.
in case you use the unix command "FTP" it will probably be the parameter -p (lowercase letter). in which case the line would look like:
[open "|$cs(ftpclient) -np $cs(ftpname) $cs(ftpport) " w]
PS: i wonder why the scripter didnt use the "ftp://[user:password@]host[:port]" format for login. using
| Code: | | [open "|$cs(ftpclient) -p ftp://$cs(username):$cs(password)@$cs(ftpname):$cs(ftpport)" w] | would spare you the "puts $ftpid "user ..." line ^-^.
in case you are really using a not all to long outdated version of FTP ^^. im not familar with that command so I might have misinterpreted the man page . _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|