Get User Info procedure - nmbook/pidgin-libbnet GitHub Wiki

New get user info procedure:

  1. get info on user in channel list (local) [if clan tag found, note it; if product/location found, note it]
  2. get info on user in friend list (local) [if product/location found, note it]
  3. if product/location not found, get info via /whois (await: EID_INFO responses)
  4. get user profile (await: SID_READUSERDATA response)

IF W3:

  1. get info on user in clan list, if in clan (local) [if in our clan, note we found clan tag is our own]
  2. get user stats (await: SID_W3GENERAL.WID_USERRECORD response)

IF W3 AND WE KNOW THE USER IS IN A CLAN:

  1. get clan member info (await: SID_CLANMEMBERINFO response)
  2. get clan stats (await: SID_W3GENERAL.WID_CLANRECORD response)

IF W3 AND WE DON'T KNOW USER'S CLAN STATUS (NOT: WE KNOW THE USER IS IN A CLAN)

  1. get clan tag with 0x35 (await: SID_W3PROFILE response)

UPON RESPONSE TO SID_PROFILE WITH VALID CLAN, DO 7 and 8.

A bitwise flag system is used to keep track of which things got their responses, and when everything has a response, the user info is displayed.