From 6ca25e9520af839e0396f1e1443b664a0b1b62bf Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 8 Feb 2018 22:15:59 +0300 Subject: Steam: do not change contact status, client and game info if protocol goes offline --- protocols/Steam/src/steam_contacts.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3