[icq-devel] User visibility



Alexander Vaga icq2000cc at hobi.ru
Tue Sep 17 09:05:54 CEST 2002


Hello vadim,

Tuesday, September 17, 2002, 2:39:48 AM, you wrote:

vw> I know that it is possible to get User visibility using snac(13,06) Reply
vw> Roaster,
vw> But  how to set  user visibility?

As you know _ALL_ records in snack(13,6) has same format.
When you analized your snac(13,6) you may found the record like this:
00 00 00 00 XX XX 00 04 00 05 00 CA 00 01 XX .
This is a Visibility setting.
Let`s show that chunk so:
00 00                    - empty string
00 00                    - GroupID
XX XX                    - Tag (unique)
00 04 00 05              - TLV(4) {len=5}
           00 CA 00 01   - TLV(CA) {len=1}
                      XX - Value of Visibility

To _UPDATE_ your Visibility Record you must use the snac(13,9).
// In case if Visibility setting is absent in snac(13,6)
// you must _ADD_ new Visibility Record to Roster using snac(13,8)

Do it so if you will _UPDATE_ Visibility:
00 13 00 09 00 00 00 E5 00 09 // snac(13,9)`s header
00 00                         // empty string
00 00                         // GroupID
XX XX                         // Tag (same as in snac(13,6))
00 04 00 05                   // tlv(4)
         00 CA 00 01          // tlv(CA)
                  XX          // NEW VISIBILITY VALUE

Or do it so if you will _ADD_ Visibility:
00 13 00 08 00 00 00 34 00 08 // snac(13,8)`s header
00 00                         // empty string
00 00                         // GroupID
XX XX                         // Tag (generate it randomly)
00 04 00 05                   // tlv(4)
         00 CA 00 01          // tlv(CA)
                  XX          // NEW VISIBILITY VALUE

That`s all.

-- 
Best regards,
 Alexander Vaga
 icq2000cc at hobi.ru





More information about the icq-devel mailing list