summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_contacts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_contacts.cpp')
-rw-r--r--protocols/Tox/src/tox_contacts.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index f25c5f4dd7..0f429c80a1 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -319,14 +319,16 @@ void CToxProto::OnConnectionStatusChanged(Tox*, uint32_t friendNumber, TOX_CONNE
if (!hContact)
return;
- Netlib_Logf(proto->m_hNetlibUser, __FUNCTION__": friend(%d) status changed to (%d)", friendNumber, status);
-
if (status == TOX_CONNECTION_NONE)
{
proto->SetContactStatus(hContact, ID_STATUS_OFFLINE);
return;
}
+ WORD status = proto->GetContactStatus(hContact);
+ if (status > ID_STATUS_OFFLINE)
+ return;
+
proto->delSetting(hContact, "Auth");
proto->delSetting(hContact, "Grant");