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.

file server script

Old posts that have not been replied to for several years.
Locked
e
eggbot

file server script

Post by eggbot »

I dl the file server tcl script but dunno how to edit.. Or it dun even need to edit?? Anyone can help?

This is the script:
bind pubm - "% !list" pub_list
bind pubm - "% !index" pub_index
bind pubm - "% !kickgate" pub_kickgate
bind pubm - "% !warftp" pub_warftp
bind pubm - "% !ircscript" pub_mirc
bind pubm - "% !webferret" pub_webferret
bind pubm - "% !amovie" pub_amovie

proc pub_list {nick uhost hand channel args} {
global botnick
putserv "PRIVMSG $channel :These are the files you can download from $botnick:"
putserv "PRIVMSG $channel :!index - !kickgate - !warftp"
putserv "PRIVMSG $channel :!ircscript - !webferret - !amovie"
}

proc pub_index {nick uhost hand channel args} {
dccsend /home/samba/index.txt $nick
}

proc pub_kickgate {nick uhost hand channel args} {
dccsend /home/samba/kickgate.tar $nick
}

proc pub_warftp {nick uhost hand channel args} {
dccsend /home/samba/warftp.exe $nick
}

proc pub_mirc {nick uhost hand channel args} {
dccsend /home/samba/cmirc.zip $nick
}

proc pub_webferret {nick uhost hand channel args} {
dccsend /home/samba/webferret.exe $nick
}

proc pub_amovie {nick uhost hand channel args} {
dccsend /home/samba/Amovie.exe $nick
}

putlog "Fileserver By: Kim Andre Norheim"
Online
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

this script is just DCC sending a file.
So you can edit the name/path of each file, or use this script as an exemple.
Why don't try something like:

Code: Select all

set mypath "/home/you/shared/"
set myfile [getfiles $mypath]

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

proc ftp:list { nick uhost handle chan args } {
   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
   }
}
I don't verify this code, but it may work :)
Locked