diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-26 20:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-26 20:23:31 +0000 |
commit | d3205b4a9cbfe603146a9d2adab6a468424f8f5d (patch) | |
tree | 9f4116a133a0a83d3685904b9841242d911a80a5 /protocols/Skype/src/skype_proto.cpp | |
parent | bed36b071fe082d34e5961bb5105e662f17aa7c6 (diff) |
fix for setting statuses
git-svn-id: http://svn.miranda-ng.org/main/trunk@4540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index ac28c0a6e2..faf7a980e0 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -375,22 +375,7 @@ 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)
+ if (new_status == this->m_iDesiredStatus)
return 0;
int old_status = this->m_iStatus;
@@ -399,6 +384,8 @@ int CSkypeProto::SetStatus(int new_status) if (new_status == ID_STATUS_OFFLINE)
{
this->LogOut();
+ this->m_iStatus = this->m_iDesiredStatus = ID_STATUS_OFFLINE;
+ this->SendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
}
else
{
@@ -410,20 +397,13 @@ int CSkypeProto::SetStatus(int new_status) }
else
{
- if ( !this->account->IsOnline())
- return 0;
-
- CContact::AVAILABILITY availability = this->MirandaToSkypeStatus(new_status);
- if (availability != CContact::UNKNOWN)
- {
- this->account->SetAvailability(availability);
- this->m_iStatus = new_status;
- }
+ if ( this->account->IsOnline())
+ SetServerStatus(new_status);
+ else
+ SendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
}
}
- this->SetSettingWord("Status", this->m_iStatus);
- this->SendBroadcast(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, this->m_iStatus);
return 0;
}
|