mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 7
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2003
Posts: 7
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?

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Joined: Sep 2003
Posts: 7
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Sep 2003
Posts: 7
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.


Link Copied to Clipboard