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 

DCC file transfer script

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


Joined: 22 Feb 2020
Posts: 385

PostPosted: Thu Sep 02, 2021 9:22 pm    Post subject: DCC file transfer script Reply with quote

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 Wink
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 877
Location: France

PostPosted: Fri Sep 03, 2021 2:52 am    Post subject: Reply with quote

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
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