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.

connecting to ftp

Help for those learning Tcl or writing their own scripts.
Post Reply
S
Spyyy
Voice
Posts: 2
Joined: Wed Mar 05, 2008 7:14 pm

connecting to ftp

Post by Spyyy »

hi.

I was wondering if its possible to connect to ftp through eggdrop after command from channel and send there command or make dir?
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Re: connecting to ftp

Post by DragnLord »

Spyyy wrote:hi.

I was wondering if its possible to connect to ftp through eggdrop after command from channel and send there command or make dir?
Indeed it is with sockets and using "PUT".
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

...or, if you don't feel like reinventing the wheel, use the ftp package.
Have you ever read "The Manual"?
S
Spyyy
Voice
Posts: 2
Joined: Wed Mar 05, 2008 7:14 pm

Post by Spyyy »

ok, thanks for helping :D
1 more question, is it possible that it will transfer files through ftps after command from channel and it will show that its complete 8) :D?

btw. how to install that ftp package
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

the following will send the file "backupfile" to the "/whereto/"-folder on "moxquiz.mo-funpic.de"

Code: Select all

set file "backupfile"
exec /usr/bin/ncftpput -V -a -m -f ~/ftpserver.ftp /whereto/ ~/$file

the "ftpserver.ftp"-file has to look like this:

Code: Select all

host moxquiz.mo.funpic.de
user moxquiz
pass supersecretpw
with this, there is no extra installation necessary.

unfortunately, my bot crashed every time, "moxquiz.mo-funpic.de" wasn't reachable. :wink:
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

tueb wrote:the following will send the file "backupfile" to the "/whereto/"-folder on "moxquiz.mo-funpic.de"

Code: Select all

set file "backupfile"
exec /usr/bin/ncftpput -V -a -m -f ~/ftpserver.ftp /whereto/ ~/$file

the "ftpserver.ftp"-file has to look like this:

Code: Select all

host moxquiz.mo.funpic.de
user moxquiz
pass supersecretpw
with this, there is no extra installation necessary.

unfortunately, my bot crashed every time, "moxquiz.mo-funpic.de" wasn't reachable. :wink:
this will only work if ncftpput is installed and at that location, poor coding to rely on shell commands that can can change location depending on operating system (or may not be installed at all)
using either TCL's socket or 'package ftp' methods are orders of magnitude better for TCL scripts
Post Reply