diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-03-05 11:41:36 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-03-05 11:41:36 +0000 |
commit | acd587cce58ccc611c45819fa9abdc0b862d3aab (patch) | |
tree | d6a86169f905dc6674f851ee3b8c4c4f5c927c0c /protocols | |
parent | eb0ab646f4f8c0080c03d207906650d23ad5d16d (diff) |
Steam: Fix setting wrong contact status when connecting to same account from official Steam client
git-svn-id: http://svn.miranda-ng.org/main/trunk@12321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Steam/src/steam_pooling.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp index e7b41db3f5..8eaef3baee 100644 --- a/protocols/Steam/src/steam_pooling.cpp +++ b/protocols/Steam/src/steam_pooling.cpp @@ -57,14 +57,14 @@ void CSteamProto::ParsePollData(JSONNODE *data) else if (!lstrcmpi(type, _T("personastate"))) { node = json_get(item, "persona_state"); - int status = SteamToMirandaStatus(json_as_int(node)); + int status = node ? SteamToMirandaStatus(json_as_int(node)) : -1; if (IsMe(steamId)) { node = json_get(item, "persona_name"); setTString("Nick", ptrT(json_as_string(node))); - if (status == ID_STATUS_OFFLINE) + if (status == -1 || status == ID_STATUS_OFFLINE) continue; if (status != m_iStatus) @@ -82,7 +82,8 @@ void CSteamProto::ParsePollData(JSONNODE *data) if (hContact == NULL) continue; // probably this is info about random player playing on same server, so we ignore it - SetContactStatus(hContact, status); + if (status != -1) + SetContactStatus(hContact, status); node = json_get(item, "persona_name"); setTString(hContact, "Nick", ptrT(json_as_string(node))); |