diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-03-06 16:46:57 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-03-06 16:46:57 +0000 |
commit | 962dc6e6519c52aeeac71fc1d1f7869e94425ed0 (patch) | |
tree | d64c642f1dfd791246e8d356d90480f9089448fa /protocols/Steam | |
parent | 7033ace59b8e45b1f39547143e5ad7652ea4b903 (diff) |
Steam: Support (fix) for showing playing status also for Non-Steam games
git-svn-id: http://svn.miranda-ng.org/main/trunk@12356 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 4d8af27c19..e3c08b103c 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -216,11 +216,12 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNODE *data) // playing game node = json_get(data, "gameid"); DWORD gameId = node ? atol(_T2A(ptrT(json_as_string(node)))) : 0; - if (gameId > 0) - { - node = json_get(data, "gameextrainfo"); - ptrT gameInfo(json_as_string(node)); + node = json_get(data, "gameextrainfo"); + ptrT gameInfo(json_as_string(node)); + + if (gameId > 0 || gameInfo[0] != '\0') + { node = json_get(data, "gameserverip"); ptrT serverIP(json_as_string(node)); @@ -232,6 +233,8 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNODE *data) setString(hContact, "ServerID", _T2A(serverID)); CMString message(gameInfo); + if (!gameId) + message.Append(TranslateT(" (Non-Steam)")); if (serverIP[0] != '\0') message.AppendFormat(TranslateT(" on server %s"), serverIP); |