summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-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);