Posted to tcl by _merlin__ at Mon Dec 03 19:47:59 GMT 2007view raw
- 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)" }
- }
- }
-