From 5af9c1bdac753b4ab1c0ddba60bacbc07e99f6ba Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 7 Oct 2014 17:58:53 +0000 Subject: Tox: correct changing of global statuses git-svn-id: http://svn.miranda-ng.org/main/trunk@10729 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 15bb2e6bc6..de3ac3f0cb 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -176,7 +176,27 @@ int __cdecl CToxProto::SetApparentMode(MCONTACT hContact, int mode) { return 0; int __cdecl CToxProto::SetStatus(int iNewStatus) { if (iNewStatus == m_iDesiredStatus) + { return 0; + } + + switch (iNewStatus) + { + case ID_STATUS_FREECHAT: + case ID_STATUS_ONTHEPHONE: + iNewStatus = ID_STATUS_ONLINE; + break; + + case ID_STATUS_NA: + case ID_STATUS_OUTTOLUNCH: + iNewStatus = ID_STATUS_AWAY; + break; + + case ID_STATUS_DND: + case ID_STATUS_INVISIBLE: + iNewStatus = ID_STATUS_OCCUPIED; + break; + } debugLogA("CToxProto::SetStatus: changing status from %i to %i", m_iStatus, iNewStatus); -- cgit v1.2.3