Betreff: Re: [icq-devel] Login Invisible



icq2000cc icq2000cc at hobi.ru
Fri Jul 26 08:34:56 CEST 2002


Hello Dimit,
Thursday, July 25, 2002, 10:57:21 PM, you wrote:

Dg> yes, im using server side contact list...
Dg> can you tell me were to get a
Dg> documentation of the SNAC(13,9) or write a small reference?

:) I see you already sow this documentations.
Will be beter if i will try to explaine this things.

Step one:
   During the login sequnce, you received SNAC(13,6).
   You must stote it.
   SNAC(13,6) consists of many types of records.
   The format of any type of record is same.
   I think you already knew about this.

   Somewhere in SNAC(13,6) is byte sequence like this:
   00 00 00 00 2C 26 00 04 00 05 00 CA 00 01 04.
   Let us describe it:

   00 00 - strlen (empty string)
   00 00 - group-id (this record is out of any group)
   2C 26 - tag (unique-random value) - you must keep it to later reference.
   next tlv(4) exactly consists visibility setting
   00 04 - "T"ype
   00 05 - "L"ength
   00 CA 00 01 04 - "V"alue consists of tlv(00CA)=04 (it`s a visibility code)

   This one may to signify next values:
   01 = Allow all users to see you
   02 = Block all users from seeing you
   03 = Allow only users in the permit list to see you
   04 = Block only users in the invisible list from seeing you
   05 = Allow only users in the buddy list to see you

Step two:
   The SNAC(13,9) serves to update any record in server side roster.
   To change your visibility, you must send only SNAC(13,9) like this:

2A 02 XX XX 00 19 - flap
00 13 00 09 00 00 00 XX 00 09 - snac header
00 00 00 00 2C 26 00 04 00 05 00 CA 00 01 (03) - snac body
(03) = Allow only users in the permit list to see you

The snac body`s format is same as visibility record from SNAC(13,6).
Especialy you must see on Tag record. It is reference to record which you are updating.

Server will ACK by SNAC(13,E) with word error code.
00 00 - record updated succesfuly.

:) did you understood me completely?

p.s. I using that code each time before my client`s status will be changed,
     and also i using it simply.

-- 
Best regards,
 icq2000cc                            mailto:icq2000cc at hobi.ru





More information about the icq-devel mailing list