View previous topic :: View next topic |
Author |
Message |
eggbot Guest
|
Posted: Tue Mar 02, 2004 7:06 am Post subject: file server script |
|
|
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" |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1108 Location: France
|
Posted: Tue Mar 02, 2004 1:55 pm Post subject: |
|
|
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: |
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  _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|