mIRC Homepage
Posted By: Sahasrahla Grabbing DCC GET FAIL error message - 17/10/03 03:30 AM
I'm trying to get a script to react differently depending on how a DCC file fails to transfer. Generally you'll get one of these errors:

DCC Get of MyFile.txt from Bobby incomplete (00:03:28 0.49 KB/Sec)
If Bobby cancelled the transfer by accident, or your cat stepped on your keyboard...

OR

DCC Get of MyFile.txt from Bobby incomplete (unable to connect)
If you aren't able to establish a direct connection with Bobby.

I've found ways to monitor almost every incoming and outgoing message in all of mIRC EXCEPT this one. I tried the ON 1:ERROR:*unable to connect*:/commands
but that didn't trigger. Apparently mIRC doesn't consider this to be an error.

the on 1:GETFAIL:*:/commands triggers fine, but I've found no way to pluck that error message out to parse it. I can only issue commands for general GETFAILS.

Any suggestions?
Posted By: Online Re: Grabbing DCC GET FAIL error message - 17/10/03 03:55 AM
If the value of $get($nick).rcvd is more than 0, you can assume that someone pressed 'Cancel' as the transfer was ongoing; otherwise you couldn't connect at all.

Btw, "on error" isn't meant to capture mIRC's internal error messages, it reacts only on specific messages that are sent by the IRC server.
Posted By: Sahasrahla Re: Grabbing DCC GET FAIL error message - 17/10/03 04:14 AM
Oh, I see... if the filesize is 0, we (presumably) couldn't connect, otherwise we got some of the file, but it died mid-way through for whatever reason...

That's perfect for my application! Thanks a pant-load!!
And thanks for the note about on:ERROR... I'll keep that in mind in the future.
© mIRC Discussion Forums