Thanks for all the great reponses.

> On Mon, 12 Mar 2007, Narcis wrote:
>> i'm trying to create RCD and have implemented most as a distress
>> which gets converted to a message string and then send as macro. This
>> seems to work, but the other side is not interpreting it as a RCD but
>> as a general macro. So what makes a RCD a RCD?
> When you send an RCD, it sends a special message with with the RCD  
> flag
> set.  The message is just a few bytes that encode the RCD number  
> (distress,
> carry, take, etc.) and things like the sender's wtemp and etemp,  
> armies
> carried, ship nearest their mouse cursor, etc.
> The format of these bytes is documented in the client source  
> somewhere.

Yes i finally tracked down where in the code, and see it is building  
a message
string (bytes) which the client or server handles differently. I  
believe it is using hte
first byte to discover it is an RCD and not a normal message:

buffer[0] = (char)((macro_flag ? 1 : 0) << 5 | distress_type);

Since Normal messages are sent in the same way (CP_MESSAGE)
on the receive side i see it is handled through short packages  
similar to other messages but using the second byte to switch over  
the message type.
prefix is DM<something> so i guess it was called dynamic messaging ?

anyway, receiving is straightforward but sending confuses me, what if  
the first
character of a message would fit in that catagory (don't have an  
ascii map
handy to see if that is possible) i would expect a CP_RCD message not an
(ab)use of the CP_MESSAGE but i may know too little about netreks early
development days.



-------------- next part --------------
An HTML attachment was scrubbed...