Llirik81, извини, что перебиваю, я думаю тебе всё равно ответят.
Я выяснил, что ICQ6 использует только новые Хстатусы, qip8000 только старые, а qip8060 - и те, и другие. Тем не менее новые Хстатусы у меня не заработали. Тогда я переписал код вот так, чтоб пакеты были равны:
Код:
procedure CreateCLI_SETNEWXSTATUS(Pkt: PRawPkt; XStat: T_NewXStatus; XStatStr: String; var Seq: Word);
var
lpkt: TRawPkt;
s: String;
begin
PktInit(Pkt, 2, Seq); //Channel 2
PktSnac(Pkt, $01, $1E, $1E, 0); //Snac: Type x01/x1E, ID x000000$1E, Flags 0
PktInitRaw(@lpkt);
PktInt(@lpkt, $0002, 2); //Type
PktInt(@lpkt, $04, 1); //Flag
S := StrToUTF8(XStatStr);
PktInt(@lpkt, Length(S) + 4, 1);
PktWStr(@lpkt, S); //Data
PktInt(@lpkt, $0000, 2); //Type
PktInt(@lpkt, $000E, 2); //Type
PktInt(@lpkt, $00, 1); //Flag
PktLStr(@lpkt, GetNewXStatus(XStat)); //Data
PktTLV(Pkt, $1D, lpkt.len, @lpkt.Data); //TLV(1D)
PktFinal(Pkt); //Finalize packet
end;
И пакеты стали равны, только всё равно ничего не работает...
Я ставил такой статус - X_FUNNY, надпись - Превед медвед!
Вот что слала ICQ6:
Код:
Packet dump:
2a 02 0f 25 00 3d 00 01-00 1e 00 00 00 00 00 1e *..%.=..........
00 1d 00 2f 00 02 04 1e-00 1a d0 9f d1 80 d0 b5 .../............
d0 b2 d0 b5 d0 b4 20 d0-bc d0 b5 d0 b4 d0 b2 d0 ...... .........
b5 d0 b4 21 00 00 00 0e-00 09 69 63 71 6d 6f 6f ...!......icqmoo
64 31 33 d13
Contents:
2A 02 0F 25 00 3D 00 01 00 1E 00 00 00 00 00 1E
00 1D 00 2F 00 02 04 1E 00 1A D0 9F D1 80 D0 B5
D0 B2 D0 B5 D0 B4 20 D0 BC D0 B5 D0 B4 D0 B2 D0
B5 D0 B4 21 00 00 00 0E 00 09 69 63 71 6D 6F 6F
64 31 33 00 (CLI_SETSTATUS):
FLAP
This is the FLAP header itself. This is not an individual packet, but
a complete description of the fields in the FLAP header of every packet
sent by both the server and the client.
[
2A (ID):
This identifies this data as a FLAP.
02 (Channel):
The channel to which this packet belongs.
0F 25 (Sequence):
The FLAP sequence number. It is chosen at random before every connection
and increased with every packet. This number is positive; wrap to zero
when it becomes negative.
00 3D (Length):
This is the length of the following data, the actual content of the
FLAP.
]
SNAС (01,1E)
The data sent with a channel 2 FLAP.
[
00 01 (Family):
The family this command belongs to.
00 1E (Command):
The command to perform.
00 00 (Flags):
Flags accompanying this command. Usually zero.
00 00 00 1E (Reference):
This field is used to associate data from different packets.
]
Data
The data this SNAC contains.
[
TLV(0x001D)
The type of this TLV is 29;
[
00 1D (Type):
00 2F (Length):
The length of the following data.
00 02 04 1E 00 1A D0 9F D1 80 D0 B5 D0 B2 D0 B5
D0 B4 20 D0 BC D0 B5 D0 B4 D0 B2 D0 B5 D0 B4 21
00 00 00 0E 00 09 69 63 71 6D 6F 6F 64 31 33 (Data):
]
]
---
(C) coban2k (coban2k@mail.ru)
Built using ICQMenace v0.9 beta (Sax-mmS) (http://www.ifud.ru) & TXT Exporter v1.1
Вот, что слала моя программа:
Код:
Packet dump:
2a 02 5e 9a 00 3d 00 01-00 1e 00 00 00 00 00 1e *.^..=..........
00 1d 00 2f 00 02 04 1e-00 1a d0 9f d1 80 d0 b5 .../............
d0 b2 d0 b5 d0 b4 20 d0-bc d0 b5 d0 b4 d0 b2 d0 ...... .........
b5 d0 b4 21 00 00 00 0e-00 09 69 63 71 6d 6f 6f ...!......icqmoo
64 31 33 d13
Contents:
2A 02 5E 9A 00 3D 00 01 00 1E 00 00 00 00 00 1E
00 1D 00 2F 00 02 04 1E 00 1A D0 9F D1 80 D0 B5
D0 B2 D0 B5 D0 B4 20 D0 BC D0 B5 D0 B4 D0 B2 D0
B5 D0 B4 21 00 00 00 0E 00 09 69 63 71 6D 6F 6F
64 31 33 6B (CLI_SETSTATUS):
FLAP
This is the FLAP header itself. This is not an individual packet, but
a complete description of the fields in the FLAP header of every packet
sent by both the server and the client.
[
2A (ID):
This identifies this data as a FLAP.
02 (Channel):
The channel to which this packet belongs.
5E 9A (Sequence):
The FLAP sequence number. It is chosen at random before every connection
and increased with every packet. This number is positive; wrap to zero
when it becomes negative.
00 3D (Length):
This is the length of the following data, the actual content of the
FLAP.
]
SNAС (01,1E)
The data sent with a channel 2 FLAP.
[
00 01 (Family):
The family this command belongs to.
00 1E (Command):
The command to perform.
00 00 (Flags):
Flags accompanying this command. Usually zero.
00 00 00 1E (Reference):
This field is used to associate data from different packets.
]
Data
The data this SNAC contains.
[
TLV(0x001D)
The type of this TLV is 29;
[
00 1D (Type):
00 2F (Length):
The length of the following data.
00 02 04 1E 00 1A D0 9F D1 80 D0 B5 D0 B2 D0 B5
D0 B4 20 D0 BC D0 B5 D0 B4 D0 B2 D0 B5 D0 B4 21
00 00 00 0E 00 09 69 63 71 6D 6F 6F 64 31 33 (Data):
]
]
---
(C) coban2k (coban2k@mail.ru)
Built using ICQMenace v0.9 beta (Sax-mmS) (http://www.ifud.ru) & TXT Exporter v1.1
И тем не менее, ни ICQ6, ни qip8060 не определяли, что я ставил такой Хстатус.
Что же делать? Может надо какую-нибудь хитрую капабилити вписать?..