View previous topic :: View next topic |
Author |
Message |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Thu Sep 02, 2021 9:22 pm Post subject: DCC file transfer script |
|
|
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: |
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: |
18<Tech> type !send <file>
18<Tech> with <file> in
|
Thanks in advanced  _________________ ComputerTech |
|
Back to top |
|
 |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 972 Location: France
|
Posted: Fri Sep 03, 2021 2:52 am Post subject: |
|
|
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 _________________ https://www.eggdrop.fr
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|