From e5d58fc3bbbce2773b7c6c3f8b7da6faa66b672e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 17 Sep 2016 16:37:24 +0000 Subject: chats: more functions, less structures git-svn-id: http://svn.miranda-ng.org/main/trunk@17309 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_chatrooms.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp index 2cf2641db8..146a225419 100644 --- a/protocols/Tox/src/tox_chatrooms.cpp +++ b/protocols/Tox/src/tox_chatrooms.cpp @@ -136,7 +136,7 @@ INT_PTR CToxProto::OnCreateChatRoom(WPARAM, LPARAM) void CToxProto::InitGroupChatModule() { - GCREGISTER gcr = { sizeof(gcr) }; + GCREGISTER gcr = {}; gcr.iMaxText = 0; gcr.ptszDispName = this->m_tszUserName; gcr.pszModule = this->m_szModuleName; @@ -152,7 +152,7 @@ void CToxProto::InitGroupChatModule() void CToxProto::CloseAllChatChatSessions() { GC_INFO gci = { 0 }; - gci.Flags = GCF_BYINDEX | GCF_ID | GCF_DATA; + gci.Flags = GCF_BYINDEX | GCF_ID; gci.pszModule = m_szModuleName; int count = pci->SM_GetCount(m_szModuleName); @@ -161,10 +161,8 @@ void CToxProto::CloseAllChatChatSessions() gci.iItem = i; if (!Chat_GetInfo(&gci)) { - GCDEST gcd = { m_szModuleName, gci.pszID, GC_EVENT_CONTROL }; - GCEVENT gce = { sizeof(gce), &gcd }; - Chat_Event(SESSION_OFFLINE, &gce); - Chat_Event(SESSION_TERMINATE, &gce); + Chat_Control(m_szModuleName, gci.pszID, SESSION_OFFLINE); + Chat_Terminate(m_szModuleName, gci.pszID); } } } -- cgit v1.2.3