Posted to tcl by _merlin__ at Mon Dec 03 19:47:59 GMT 2007view raw

  1. set files "/home/eggdrop/test.txt"
  2.  
  3. bind pub - !test test_send
  4. proc test_send {nick uhost hand chan file} {
  5. global files
  6. switch -- [dccsend $files $nick] {
  7. 0 {
  8. puthelp "NOTICE $nick :sending $files to you."
  9. dccsend $files $nick
  10. }
  11. 1 { puthelp "NOTICE $nick :dcc table is full (too many connections), try to get $files later." }
  12. 2 { puthelp "NOTICE $nick :can't open a socket for the transfer of $files." }
  13. 3 { puthelp "NOTICE $nick :$files doesn't exist." }
  14. 4 { putserv "PRIVMSG $chan :Unable to send $files (User has too many transfers)" }
  15. }
  16. }
  17.