diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-09 18:59:07 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-09 18:59:07 +0000 |
commit | edf1dd945f1781cfb0ccd6149f0a279480c97af9 (patch) | |
tree | 4359b238eaf3050418cc8c9e1f389ad7eed6c984 | |
parent | 7a2293c2b3369309db885085863a50ec2b0d186a (diff) |
Steam: Fix not holding proper contact status (e.g. looking for play/trade)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11307 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 96c92c285c..c1705f8ebb 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -176,10 +176,11 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNODE *data) setDword(hContact, "LogoffTS", json_as_int(node)); // status - node = json_get(data, "personastate"); - WORD steamStatus = json_as_int(node); - WORD status = SteamToMirandaStatus(steamStatus); + // NOTE: this here is wrong info, probably depending on publicity of steam profile, but we don't need this at all, we get status updates by polling + /*node = json_get(data, "personastate"); + status = SteamToMirandaStatus(json_as_int(node)); SetContactStatus(hContact, status); + */ // client node = json_get(data, "personastateflags"); @@ -187,9 +188,12 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNODE *data) switch (stateflags) { case 0: - // nothing special, either standard client or in different status (only online, I want to play, I want to trade statuses support this flags) - if (steamStatus == 1 || steamStatus == 5 || steamStatus == 6) - setTString(hContact, "MirVer", _T("Steam")); + { + // nothing special, either standard client or in different status (only online, I want to play, I want to trade statuses support this flags) + WORD status = getWord(hContact, "Status", ID_STATUS_OFFLINE); + if (status == ID_STATUS_ONLINE || status == ID_STATUS_OUTTOLUNCH || status == ID_STATUS_FREECHAT) + setTString(hContact, "MirVer", _T("Steam")); + } break; case 256: // on website |