if GetInt(Pkt, 2) = $2711 then //Searching for TLV(2711) (with sources)
begin
Inc(Pkt^.Len, 2); //TLV Length
Move(Ptr(LongWord(Pkt) + Pkt^.Len)^, chunks, 47);
if GetInt(Pkt, 1) <> $1B then //If this value is not present, this is not a message packet. Also, ICQ2001b does not send an ACK, SNAC(4,B), if this is not 0x1B.
Exit;
Inc(Pkt^.Len, 44);
MsgType := GetInt(Pkt, 1);
Inc(Pkt^.Len, 5);
Msg := GetLNTS(Pkt); //The actual message text. There will be ending NULL.
CTag := GetInt(Pkt, 2); //This field seems to be a tag or marker associating different groups together into a larger group such as the Ignore List or 'General' contact list group, etc.
CId := GetInt(Pkt, 2); //This is a random number generated when the user is added to the contact list, or when the user is ignored.
CType := GetInt(Pkt, 2); //This field seems to indicate what type of group this is.
Len := GetInt(Pkt, 2); //The length in bytes of the following TLVs.
if (CType = 0) or (CType = 2) or (CType = 3) or (CType = $e) then
begin
GetMem(lpEntry, SizeOf(lpEntry^));
lpEntry^.UIN := StrToInt(FGroup);
lpEntry^.Nick := FNick;
lpEntry^.CType := CType;
lpEntry^.CTag := CId;
lpEntry^.CGroupID := CTag;
UINList.Add(lpEntry);
end;
end;
var
count, T: Word;
i: Word;
begin
GetTLVInt(Pkt, T); if T <> 6 then Exit;
Inc(Pkt^.Len, 4); //02 00 02 00 - UNKNOWNs
count := GetInt(Pkt, 2); //Total count of following groups. This is the size of the server side contact list and should be saved and sent with CLI_CHECKROSTER.