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 

help AGAIN!

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


Joined: 11 Nov 2003
Posts: 42

PostPosted: Tue Nov 25, 2003 5:46 pm    Post subject: help AGAIN! Reply with quote

okay i've given up on my lost few posts. for some reason the area of dccsends has little to nill on support.... but i did find this script, and it works!
however it's more or less in two parts and unfortunatly one doesn't work so well without the other... the two parts are the actual dccsend command /w trigger the other is a directory list procedure that calls and makes a list of the files in the set directory, so you may use the dccsend trigger to get a desired file.

here is the script, and it does work:

Code:

set filesdir "e:/windrop1/grincheg/windrop/tmp"

bind pub - get pub:get

proc pub:get {nick uhost hand chan file} {
  global filesdir
  if {$file != ""} {
    switch -- [dccsend $filesdir/$file $nick] {
    0 {
      puthelp "NOTICE $nick :sending $file to you."
      dccsend $file $nick
    }
    1 { puthelp "NOTICE $nick :dcc table is full (too many connections), try to get $file later." }
    2 { puthelp "NOTICE $nick :can't open a socket for the transfer of $file." }
    3 { puthelp "NOTICE $nick :$file doesn't exist." }
    4 { puthelp "NOTICE $nick :$file was queued for later transfer." }
    }
  } else { puthelp "NOTICE $nick :get <file> or getlist" }
}

bind pub - getlist pub:getlist

proc pub:getlist {nick uhost handle chan arg} {
  global filesdir
  if {$arg != ""} { set cdir $filesdir/$arg } else { set cdir $filesdir }
  set tdir [pwd]
  cd $cdir
  foreach fil "[glob *]" {
    if {[file isdirectory $fil]} { puthelp "NOTICE $nick :$arg/$fil" }
    if {[file isfile $fil]} { puthelp "NOTICE $nick :$arg/$fil (size: [file size $fil] bytes)" }
  }
  puthelp "NOTICE $nick :end of getlist!"
  cd $tdir
}


now what i want to know is how to keep the fist halk of the script which is the get portion and loose the rest?? i am only intrested in the dccsend portion!

please, if anyone can help feel free to jump right in!
thanks in advance
Back to top
View user's profile Send private message
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