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.

DCC send

Old posts that have not been replied to for several years.
Locked
s
spooki

DCC send

Post by spooki »

Code: Select all

set filesdir "arhiv/system"

####################################################################################################

bind pub - !get getfile

proc getfile {nick uhost hand argv} {
global filesdir
foreach chan [channels] {
if [onchan $nick $chan] {
putserv "NOTICE @$chan :Beginning DCC Send to $nick ($argv)"
}
}
dccsend $argv $nick
}

####################################################################################################

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
}
It's my DCC bot's code. When I want to see the list of files for downloading all well, but when I want download what or the file that is written to me here this inscription Tcl error [getfile]: wrong * args: should be " getfile nick uhost hand argv " I do not understand in what business. You could not help me. What code should be, that the boat sent a file to the user which requests a file?

P.S. I very need it ! Sorry for bad English, I'm russian ;-{
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Here's the fixed code:

Code: Select all

bind pub - !get getfile 

proc getfile {nick uhost hand chan argv} { 
global filesdir 
foreach chan [channels] { 
if [onchan $nick $chan] { 
putserv "NOTICE @$chan :Beginning DCC Send to $nick ($argv)" 
} 
} 
putserv "PRIVMSG $nick :\001DCCSEND\001 $argv $nick"
}
Note the addition of "chan" in the arguments passed to the proc. Also note the format of the "dccsend" command. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
s
spooki

Post by spooki »

After I have inserted your code. After a spelling of a command! get everyone receive in privat such line DCCSEND games/Quake 3/Quake III Arena.rar spooki! But the file is not sent. How to make that a file it was sent the user, instead of the inscription at all in private was written, what for a file is sent?! :oops: :x
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Using eggdrop as a file server can be a complicated process. There is already an excellent script wriiten that might make everything easier for you. You can download jIRCoff here.

Hope this helps. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked