PktInt(@lpTLV2711, $00, 1); //00 - normal message 80 - multiple recipients 03 - auto reply message request.
PktInt(@lpTLV2711, $0000, 2); //Usually 0, seen 0x2000.
PktInt(@lpTLV2711, $0000, 2); //Usually 0, seen 0x0002 in information request messages.
PktLNTS(@lpTLV2711, Msg); //The message!
PktInt(@lpTLV2711, $00000000, 4); //Only present in actual real messages, this will be the background color of the text box in RGB0 format.
PktInt(@lpTLV2711, $FFFFFF00, 4); //Only present in actual real messages, this will be the text color of the message in RGB0 format.
if RTFFormat then //If we are using RTF format, then add GUID
begin
PktLInt(@lpTLV2711, Length(StrGuid), 4); //This is a little-endian string length of the following GUID. This is only present in real messages sent by the latest 2001b client build 3659.
PktStr(@lpTLV2711, StrGuid); //This GUID seems to indicate that the client is capable of handling Multibyte Wide Character Strings as messages. Only present in real messages sent by build 3659 2001b clients.
end;
PktInitRaw(@lpTLV05); //TLV(05)
PktInt(@lpTLV05, $0000, 2); //0x0000 - normal message
PktInt(@lpTLV05, ITime, 4); //Seems to be a time stamp in 1/1500 sec since 8am of that Sunday.
PktInt(@lpTLV05, IRandom, 2); //A seemingly random ID generated for each message.
PktInt(@lpTLV05, $0000, 2); //Unknown: 0.
PktAddArrBuf(@lpTLV05, @Capabilities, 16); //One of the capabilities sent in CLI_SETUSERINFO
PktTLV(@lpTLV05, $000a, 2, $0001); //0x0001 - normal message 0x0002 - file ack or file ok
PktInt(Pkt, $00000000, 4); //The foreground the client is expected to use.
PktInt(Pkt, $ffffff00, 4); //The background color the client is expected to show the message with.
if RTFFormat then
begin
PktLInt(Pkt, Length(StrGuid), 4); //This is a little-endian string length of the following GUID. This is only present in real messages sent by the latest 2001b client build 3659.
PktStr(Pkt, StrGuid); //This GUID seems to indicate that the client is capable of handling Multibyte Wide Character Strings as messages. Only present in real messages sent by build 3659 2001b clients.}