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 

file server script

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
eggbot
Guest





PostPosted: Tue Mar 02, 2004 7:06 am    Post subject: file server script Reply with quote

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: 1145
Location: France

PostPosted: Tue Mar 02, 2004 1:55 pm    Post subject: Reply with quote

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 Smile
_________________
Eggdrop community - French IRC network
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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