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.

ChanStats FTP and Passive mode

Support & discussion of released scripts, and announcements of new releases.
Post Reply
V
Venus
Voice
Posts: 3
Joined: Thu Mar 10, 2005 7:03 pm
Location: Washington

ChanStats FTP and Passive mode

Post by Venus »

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

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

Post by demond »

Code: Select all

puts $ftpid "passive"
V
Venus
Voice
Posts: 3
Joined: Thu Mar 10, 2005 7:03 pm
Location: Washington

Post by Venus »

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.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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

[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 :D.
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...
Post Reply