summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp17
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h1
3 files changed, 21 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index dee3f7adc6..a8ed6868a0 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -36,7 +36,22 @@ void CSkypeProto::SetContactStatus(MCONTACT hContact, WORD status)
void CSkypeProto::SetAllContactsStatus(WORD status)
{
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
- SetContactStatus(hContact, status);
+ {
+ if (!isChatRoom(hContact))
+ SetContactStatus(hContact, status);
+ else
+ SetContactStatus(hContact, status);
+ }
+}
+
+void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus)
+{
+ ptrT tszChatID(getTStringA(hContact, "ChatRoomID"));
+ if (tszChatID == NULL)
+ return;
+ GCDEST gcd = { m_szModuleName, tszChatID, GC_EVENT_CONTROL };
+ GCEVENT gce = { sizeof(gce), &gcd };
+ CallServiceSync(MS_GC_EVENT, (iStatus == ID_STATUS_OFFLINE) ? SESSION_OFFLINE : SESSION_ONLINE, (LPARAM)&gce);
}
MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent)
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 70124ca692..9c7acf6922 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -221,10 +221,12 @@ int CSkypeProto::SetStatus(int iNewStatus)
}
requestQueue->Stop();
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE);
+ m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
+
if (!Miranda_Terminated())
SetAllContactsStatus(ID_STATUS_OFFLINE);
-
- m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
+ return 0;
}
else
{
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index cc9668083d..1c68f1a1b6 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -258,6 +258,7 @@ private:
static void ResetOptions(HWND hwndDlg);
static void FilterContacts(HWND hwndDlg, CSkypeProto *ppro);
+ void SetChatStatus(MCONTACT hContact, int iStatus);
//polling
void __cdecl PollingThread (void*);