mIRC Homepage


Posted By: Scorpwanna

on SEND - 20/05/07 02:05 AM

A friend of mine in the chat has a connection problem and his chat sessions always get disconnected. I've been sending a few files to him over DCC, his connection dies (due to his internet provider) and I have to manually resume the send. Since he and I aren't always in the chat actively I thought perhaps I'd try to put together some script that monitors his downloading and will automatically resend the file so that he can resume without having to monitor it myself.

I haven't been scripting in a while and haven't dug around in the mIRC options in a while either to check if there's a way to get started on this script. I was thinking of using a type of "on sending a file start a timer that checks every minute to see if the bytes sent to him are equal to the total size of the file, if not it then resumes. The problem is I need to figure out a way to turn this on when a send begins. I had thought before that there was a such thing as "on SEND" but I guess that was just in my head. Looked through the help file at all the "on" events and can't find one that can be used in this scenario. Any help appreciated.
Posted By: RoCk

Re: on SENDFAIL - 20/05/07 02:11 AM

Posted By: Scorpwanna

Re: on SEND - 20/05/07 08:30 PM

I've tried "on sendfail" but it doesn't always seem to work for me. His connection would die and the transfer would stop. The event never echoed the test text.

I suppose on 1:DCCSERVER:SEND: is out of the question since it works backwards. To me "on 1:DCCSERVER:SEND: should be if you are sending to someone rather than them GETing something from you. "on 1:DCCSERVER:GET:" should be the correct use of that IMO.

There's another part of this script as well, I wanted to log each send event, when it started how long it took etc... But again, I dunno which event triggers it.

I just could of sworn at one point in time there was a way to detect the sending of a file.
Posted By: billythekid

Re: on SEND - 22/05/07 08:52 AM

could you loop through using $send(-1) somehow, perhaps with a timer?

Posted By: chiram

Re: on SEND - 22/05/07 10:14 AM

you can use the ctcp that gets sent when any dcc is going to attempt to transfer and setup a timer based on it..

ctcp *:DCC SEND*:{ if ($7) { echo -s Attempting transfer of $3 to $nick } }

the if ($7) is because the same "dcc send" ctcp is sent to you both when the other user is confirming your dcc send to them, or initiating a dcc send to you. there is 6 total fields when the other person is initiating a send, and 7 total fields when they are confirming a send initiated by you.
© 2021 mIRC Discussion Forums