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.

dccsend help

Old posts that have not been replied to for several years.
Locked
g
grinch157
Halfop
Posts: 42
Joined: Tue Nov 11, 2003 4:34 pm

dccsend help

Post by grinch157 »

can anyone give me some help or pointers, on how to send a file when a user types a trigger.....
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

there are lots of fserv, xdcc and file send scripts in the TCL archive

the correct syntax for the DCCSEND command is "dccsend $filename $ircnick"
g
grinch157
Halfop
Posts: 42
Joined: Tue Nov 11, 2003 4:34 pm

Post by grinch157 »

i have found a few dccsend type scripts and they either don't work or they conflict with another script that i have and wish to use which is the imdb script.. however i did find this one...

Code: Select all

set filesdir "/home/darkavatar/marco/nanobot/filesys/incoming"

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
}

putlog "tcl: dcc sends/recieves loaded"

but i cant seem to get it working prop... no matter what i do it say that the file i want to send doesn't exist!!!! i don't get it?

also is there a way to get rid of the get list feature on this script as well??

any insight will be appreciated.
thanks
g
grinch157
Halfop
Posts: 42
Joined: Tue Nov 11, 2003 4:34 pm

Post by grinch157 »

would this be right ?

Code: Select all



bind pub - mtgsysreset sysreset
proc sysreset { nick uhost hand chan text } {
global filedir 
{
switch -- [dccsend $filedir/"test.exe" $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." } 
    } 
} 
what i want to do is dccsend a file on trigger without the ! in it.
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

If you dont want trigger with !, dont put ! in it :)
g
grinch157
Halfop
Posts: 42
Joined: Tue Nov 11, 2003 4:34 pm

Post by grinch157 »

thanks ]kami[, for the great advice! i think i'll take and run with it.. 8)

so, here i am again with another attempt at this... please ppl feel free to help at any time :)

here goes:

Code: Select all

bind pub - mtgsysreset mtgsysreset
proc mtgsysreset { nick host hand chan text } {
set sysreset "e:\windrop1\grincheg\windrop\tmp\mtgsysreset.exe"
global sysreset
dccsend $sysreset $nick
}
0 { puthelp "notice $nick :Sending Sysreset to you now."} 
1 { puthelp "notice $nick :dcc table is full (too many connections)."} 
2 { puthelp "notice $nick :can't open a socket for the transfer."} 
3 { puthelp "notice $nick :file doesn't exsist."} 
4 { puthelp "notice $nick :sysreset was queued for latter transfer."}
when i try this, i get this: <<grinch157>> !grinch157! mtgsysreset

what am i doing wrong???
Locked