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.

DCC file transfer script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

DCC file transfer script

Post by ComputerTech »

Hiya, so i found this old script from this forum made by CrazyCat back in 2004(old ikr?), however i can't get it to work, here's the code

Code: Select all

set mypath "/home/computertech/tech/filesys/foo/"
set myfile [getfiles $mypath]

bind pub - !list ftp:list
bind pub - !send ftp:send

proc ftp:list { nick uhost handle chan args } {
global myfile
	putserv "privmsg $nick :type !send <file>"
	putserv "privmsg $nick :with <file> in $myfile"
}
proc ftp:send {nick uhost handle chan args} {
	set file [concat $::mypath [lindex $args 0]]
	if {![file exists $file] } {
		putserv "privmsg $nick :This file doesn't exist"
		return 0
	} else {
		dccsend $file $nick
	}
}
From this Page

And i get this when i do !list

Code: Select all

18<Tech> type !send <file>
18<Tech> with <file> in 
Thanks in advanced :wink:
ComputerTech
User avatar
CrazyCat
Revered One
Posts: 1293
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

I think the getfiles* doesn't return exactly what is needed, probably you must change it with a glob

* a list of files in the directory given; the directory is relative to dcc-path
Post Reply