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 wont work

Help for those learning Tcl or writing their own scripts.
Post Reply
w
wubmerlin
Voice
Posts: 6
Joined: Sun Nov 04, 2007 11:50 am

DCCSEND wont work

Post by wubmerlin »

Hello, i try to make my bot send test.txt. all needed modules are loaded but i cant get this **** work.

Eggdrop v1.6.18+SSL (C) 1997 Robey Pointer (C) 2006 Eggheads
[12:54] --- Loading eggdrop v1.6.18+SSL (Mon Dec 3 2007)
[12:54] Listening at telnet port 52456 (all).
[12:54] Module loaded: dns
[12:54] Module loaded: channels
[12:54] Module loaded: server
[12:54] Module loaded: ctcp
[12:54] Module loaded: irc
[12:54] Module loaded: transfer (with lang support)
[12:54] Module loaded: share
[12:54] Module loaded: filesys (with lang support)
[12:54] Module loaded: notes (with lang support)
[12:54] Module loaded: console (with lang support)
[12:54] Module loaded: blowfish
[12:54] Module loaded: uptime

Here's my code:

Code: Select all

set files "/home/eggdrop/test.txt"

bind pub - !test test_send
proc test_send {nick uhost hand chan file} {
        global files
        switch -- [dccsend $files $nick] {
                0 {
                        puthelp "NOTICE $nick :sending $files to you."
                        dccsend $files $nick
                }
                1 { puthelp "NOTICE $nick :dcc table is full (too many connections), try to get $files later." }
                2 { puthelp "NOTICE $nick :can't open a socket for the transfer of $files." }
                3 { puthelp "NOTICE $nick :$files doesn't exist." }
                4 { putserv "PRIVMSG $chan :Unable to send $files (User has too many transfers)" }
        }
}


Thanks.
w
wubmerlin
Voice
Posts: 6
Joined: Sun Nov 04, 2007 11:50 am

Post by wubmerlin »

Oh ... and i teste with a wrong filename, the bot reply this:

[13:05:38] -BOT- /home/eggdrop/test2.txt doesn't exist.

If i put the GOOD filename, NOTHING happend ... the bot didn't react ...
Post Reply