From edfcad0729bdf7fb38d64d59febc21118cb37521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 5 Jan 2013 10:37:09 +0000 Subject: Skype: Fixed behavior of setting unsupported statuses git-svn-id: http://svn.miranda-ng.org/main/trunk@2972 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_proto.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'protocols/Skype') diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 907a36047a..f9a94fc96a 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -258,6 +258,21 @@ int __cdecl CSkypeProto::SetApparentMode( HANDLE hContact, int mode ) { retur int CSkypeProto::SetStatus(int new_status) { + switch (new_status) + { + case ID_STATUS_OCCUPIED: + new_status = ID_STATUS_DND; + break; + case ID_STATUS_FREECHAT: + new_status = ID_STATUS_ONLINE; + break; + case ID_STATUS_ONTHEPHONE: + case ID_STATUS_OUTTOLUNCH: + case ID_STATUS_NA: + new_status = ID_STATUS_AWAY; + break; + } + if (new_status == this->m_iStatus) return 0; @@ -287,11 +302,11 @@ int CSkypeProto::SetStatus(int new_status) { CContact::AVAILABILITY availability = this->MirandaToSkypeStatus(new_status); if (availability != CContact::UNKNOWN) + { this->account->SetAvailability(availability); - - this->m_iStatus = new_status; + this->m_iStatus = new_status; + } } - break; } -- cgit v1.2.3