dccsend command should take care of this unless ur willing to write one of ur own .. load the transfer module
hmm and to answer ur question i think its like this open the file fconfigure the channel to bin then read it and send it to the socket or idx if u prefer that .. maybe could use
filesend <idx> <filename> [ircnick]
command if u wana do it like this .. then i gues u don't have to open the file and read it u just could do filesend
cerberus_gr wrote:I don't know if the topic is the best, but this is that I want to do:
I have connected to a server througth connect and listen commands.
Someone from this server sent me a dcc file. How could I take this file.
1) What should I do when I see the ctcp dcc send command? Just open a listen port in my eggdrop and send ctcp dcc send accept command?
2) When the transfer begins, how could be sure that the file saves in binary format (is this right?)?
Eggdrop's socket commands can't be used to transmit binary data. Use 'socket' or the commands provided by the transfer module.
Opening a listening socket won't do you much good
When you get a ctcp "dcc send" you'll have to connect to the ip and port provided in the ctcp. The transfer begins as soon as you connect, so just save whatever you recieve after connecting. (using 'fcopy' can make this part alot easier)
'fcopy' deals with file channels. You'll have to use 'socket', not 'connect' if you want a file channel. And there's no need to convert the ip because 'socket' understands the decimal ip as it is in the ctcp just fine.