summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-08 22:15:59 +0300
committeraunsane <aunsane@gmail.com>2018-02-08 22:15:59 +0300
commit6ca25e9520af839e0396f1e1443b664a0b1b62bf (patch)
tree46f3d97e22aac25c48766f17abb70ae507bc08e1 /protocols/Steam
parentc24320bdb770d48d2b7502a25c154ecc7af75c28 (diff)
Steam: do not change contact status, client and game info if protocol goes offline
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/steam_contacts.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index e163597127..e3d3c8c9c7 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -157,12 +157,15 @@ void CSteamProto::UpdateContactDetails(MCONTACT hContact, const JSONNode &data)
node = data["lastlogoff"];
setDword(hContact, "LogoffTS", node.as_int());
+ if (!IsOnline())
+ return;
+
// status
node = data["personastate"];
// note: this here is often wrong info, probably depending on publicity of steam profile
// but sometimes polling does not get status at all
WORD oldStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE);
- // so, set status only if contact offline
+ // so, set status only if contact is offline
if (oldStatus == ID_STATUS_OFFLINE) {
WORD status = SteamToMirandaStatus((PersonaState)node.as_int());
SetContactStatus(hContact, status);