mIRC Home    About    Download    Register    News    Help

Print Thread
#70612 07/02/04 07:18 PM
Joined: Feb 2004
Posts: 2
A
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Feb 2004
Posts: 2
Hi! I heard that mIRC is not compatible with xchat's resume protocol? Is this true?

#70613 07/02/04 11:16 PM
Joined: Sep 2003
Posts: 70
M
Babel fish
Offline
Babel fish
M
Joined: Sep 2003
Posts: 70
I don't know. But if so, this does not belong in bug reports as it would be the lack of a feature, not a bug.

#70614 08/02/04 04:15 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
maybe xchat isnt compatible with mircs resume protocol? <snicker snicker>

#70615 08/02/04 05:17 AM
Joined: Feb 2004
Posts: 2
A
Bowl of petunias
OP Offline
Bowl of petunias
A
Joined: Feb 2004
Posts: 2
This is what's on Obsidian FServe script for xchat

Q: Hey the resume function is broken. Most files just won't resume.
A: I'm afraid it's neither my nor xchat's fault. The recent mirc releases have a broken implementation of the dcc resume protocol. While mirc understands it's own broken protokol most other irc clients will rightfully reject mirc's resume requests. Relax, it's not Your problem.

#70616 08/02/04 05:42 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
The number of times i hear from help desks that its seomeone elses fault... It might or might not be, this is the dcc resume protocol in its simplest...

sender > dcc send filename ipaddress port filesize
or
sender > dcc send "file name" ipaddress port filesize

reciever > dcc resume placeholder port position

sender > dcc accept placeholder port position

Placeholder can be the filename but doesnt need to be as the dcc in question is isolated by the port, mirc before 6.12 did not uses the original filename either so it isnt something thats just appeared.

I would think its the placeholder mirc is using that xchat cant deal with correctly, But since it is just a placeholder, IMO its on xchats back if it isnt compatable to a resume.

#70617 16/02/04 09:45 AM
Joined: Oct 2003
Posts: 5
L
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
L
Joined: Oct 2003
Posts: 5
The two are currently incompatible because the newer versions of mIRC send two empty quotation marks ( "" ) as the filename placeholder. If you want a more detailed description of what is going on, refer to the end of my post here. I really don't believe that this is a bug attributable to either side, but rather, just two different (equally correct) implementations of a very vague protocol specification.

On the other hand, here is a small work-around script you can add to the Remotes section of the script editor in mIRC. This script will allow you to resume downloads from xchat clients.

Code:
ctcp *:DCC SEND:*: {
  if ($exists($filename)) {
    if ($file($filename).size &gt;= $gettok($1-,-1,32)) { halt }
    var %resumepos = $calc($file($filename).size - 8192)
    if (%resumepos &lt; 0) { %resumepos = 0 }
    .msg $nick $chr(1) $+ DCC RESUME $+(",$nopath($filename),") $gettok($1-,-2,32) %resumepos $+ $chr(1)
  }
}


Note that when using this script two DCC RESUME messages are sent, the first is the xchat compatible one and the second is the incompatible one mIRC sends (containing an empty "" string for the filename placeholder).

I don't think there's any way to both stop mIRC sending it's own DCC RESUME message and to still receive the file. In any case, I've been using this for several months and haven't noticed any problems.

-------

I've looked at the xchat source code and it's obvious that when xchat tries to parse the DCC RESUME message in this case, it cannot recognise the "" as a filename placeholder and hence reads the port number as the placeholder, the resume position as the port number and some undefined value (I'll just say 0) as the resume position.

I.e.
If mIRC (receiver) sent a resume message with 2188 as the port, 53274 as position:
DCC RESUME "" 2188 53274
an mIRC sender will recognise it as:
DCC RESUME "" 2188 53274
an xchat sender will recognise it as: (I put 0 as the position but it could be anything)
DCC RESUME 2188 53274 0

Of course, since the port number is misread when the placeholder is "", xchat cannot identify the other details of the request in order to send the file.

It is the function void process_data_init in /xchat-2.0.7/src/common/outbound.c starting on line 156 which is responsible for not recognising "" as a seperate token and not assigning an empty string. A simple modification to this function would correct the DCC RESUME compatibility issue.

I imagine that the problem would be even easier for Khaled to fix from mIRC's side of things, especially considering that it has worked in older versions and that no parsing is necessary, he simply needs to replace the "" with a set string (it doesn't matter what the string is as long as it doesn't contain only quotation marks).

#70618 17/02/04 04:07 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
nice fix, and nicely explained.

PS: does
ctcp *:DCC SEND:*: {
work? i always thougght it had to be "ctcp *:DCC SEND *:*: {" but i havent got mirc here to check.

#70619 17/02/04 06:06 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Yes, it does. This is a special behavior of the CTCP event. "Ctcp *:ping:..." works too.


Link Copied to Clipboard