egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ftp

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Sat Sep 11, 2010 4:35 pm    Post subject: Ftp Reply with quote

Hi im using an ftp script on my eggy that i found in the tcl archive however it dont seem to be uploading the files do i have to add any thing else to my eggdrop for it to beable to use ftp scripts

Edit: Restrted my eggdrop getting this error on partyline

PutinFtp.TCL: Uploading
Tcl error in script for 'timer4':
child process exited abnormally

Script below is what im using

Code:
#This Script Upload files (default: two) to ur remote server#
#If u want Upload More Files, Just Add more lines, ex:
#DEFAULT 2:
#set onefile "file1"
#set twofile "file2"
#
#Add More Lines if u want upload more files.
#
#set threefile "file3"
#set fourfile "file4"
#
#find this line:
#global serverftp ftpuser ftpass sendtime eggpath serverpath onefile twofile
#
#and add this:
#threefile fourfile
#
#example: global serverftp ftpuser ftpass sendtime eggpath serverpath threefile fourfile
#
#And find this lines:
#puts $wurstbaum "put $eggpath/$onefile $serverpath/$twofile"
#
#and add after it's lines:
#   puts $wurstbaum "put $eggpath/$threefile $serverpath/$threefile"
#   puts $wurstbaum "put $eggpath/$fourfile $serverpath/$fourfile"
#
##########################################################
##########################################################
# Put every x minutes send ur files.
#
set sendtime 1

##########################################################
# Put in ur name file.
#
set onefile "fileone"
set twofile "filetwo"

##########################################################
# Now enter the hostname of the ftp server where upload.
#
set serverftp ""

##########################################################
# Username and Password for the ftp account.
#
set ftpuser ""
set ftpass ""

##########################################################
# Path of your files on your shell
#
set eggpath "/home/ircduser/Gateway/logs/"

##########################################################
# Absolute path of ur remote server FTP
#
set serverpath "/home/chatters/public_html/Logfiles/"

###################################################################
## DONT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ##
###################################################################

if {[info exists putinftp_running]} {
 timer $sendtime putinftp
 set putinftp_running 1
}

 proc putinftp { } {
   global serverftp ftpuser ftpass sendtime eggpath serverpath onefile twofile
   putlog "PutinFtp.TCL: Uploading"
   set ftpclient [exec which ftp]
   set wurstbaum [open "|$ftpclient -n $serverftp" w]
   puts $wurstbaum "user $ftpuser $ftpass"
   puts $wurstbaum "bin"
   puts $wurstbaum "put $eggpath/$onefile $serverpath/$onefile"
   puts $wurstbaum "put $eggpath/$twofile $serverpath/$twofile"
   puts $wurstbaum "quit"
   putlog "PutinFtp.TCL: Uploaded File"
   close $wurstbaum
        timer $sendtime putinftp
   return 1
}

putlog "4-==PutinFtp.TCL\: v1.0 by Nor7on loaded.==-"

############################################################################
##################################################################
###
###
##            Thats it.
##
#
#Contac: yournick@nor7on.org - Channel: #Madrid - Undernet. web: www.nor7on.org

_________________
Blake
UKEasyHosting UKStormWatch


Last edited by blake on Mon Sep 13, 2010 7:34 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Trixar_za
Op


Joined: 18 Nov 2009
Posts: 143
Location: South Africa

PostPosted: Sat Sep 11, 2010 10:05 pm    Post subject: Reply with quote

Maybe try removing the timer $sendtime putinftp line from proc putinftp?

It's kind of weird that a proc is calling itself with a timer within itself. Creates a pretty nasty loop I would imagine.
_________________
http://www.trixarian.net/Projects
Back to top
View user's profile Send private message Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Sun Sep 12, 2010 8:27 am    Post subject: Reply with quote

If I remove that will it stop the script sending the files every couple of minutes though as im using it to send room logs to my website

Edit done that but nothing is happening at all now
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
Trixar_za
Op


Joined: 18 Nov 2009
Posts: 143
Location: South Africa

PostPosted: Sun Sep 12, 2010 10:57 am    Post subject: Reply with quote

You're right. Seems there is a variable missing somewhere.

Add in set putinftp_running 1 just after set serverpath "/home/chatters/public_html/Logfiles/"

Also make if {![info exists putinftp_running]} to if {[info exists putinftp_running]} (just remove the ! basically).

Now it should start the timer when the script is loaded.
_________________
http://www.trixarian.net/Projects
Back to top
View user's profile Send private message Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Mon Sep 13, 2010 7:35 am    Post subject: Reply with quote

Changed

Code:
if {![info exists putinftp_running]} {
 timer $sendtime putinftp
 set putinftp_running 1
}


To

Code:
if {[info exists putinftp_running]} {
 timer $sendtime putinftp
 set putinftp_running 1
}


Still getting the following error

PutinFtp.TCL: Uploading
Tcl error in script for 'timer1':
child process exited abnormally
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Wed Sep 15, 2010 10:04 pm    Post subject: Reply with quote

Any one able to help with this or come up with something similar
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber