summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-10-07 17:58:53 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-10-07 17:58:53 +0000
commit5af9c1bdac753b4ab1c0ddba60bacbc07e99f6ba (patch)
treeb6daa570223a0f4518e4108e107ce8ebbfec0a82 /protocols/Tox/src
parent3e9466ad1af8e37db2c9e5ada218dfbdadc8ca72 (diff)
Tox: correct changing of global statuses
git-svn-id: http://svn.miranda-ng.org/main/trunk@10729 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/tox_proto.cpp20
1 files changed, 20 insertions, 0 deletions
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);