mIRC Home    About    Download    Register    News    Help

Print Thread
on SEND #177117 20/05/07 02:05 AM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
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.


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: on SENDFAIL [Re: Scorpwanna] #177119 20/05/07 02:11 AM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025
Try /help ON SENDFAIL

Re: on SEND [Re: RoCk] #177158 20/05/07 08:30 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
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.

Last edited by Scorpwanna; 20/05/07 08:50 PM.

We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: on SEND [Re: Scorpwanna] #177252 22/05/07 08:52 AM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
could you loop through using $send(-1) somehow, perhaps with a timer?

btk


billythekid
Re: on SEND [Re: billythekid] #177261 22/05/07 10:14 AM
Joined: May 2007
Posts: 23
C
chiram Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 23
you can use the ctcp that gets sent when any dcc is going to attempt to transfer and setup a timer based on it..

Code:
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.