summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-17 16:37:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-17 16:37:24 +0000
commite5d58fc3bbbce2773b7c6c3f8b7da6faa66b672e (patch)
tree6432409a59b53d8098ac38aa1d3072ae2e5f9e4b /protocols/Tox/src
parent17e345e621254103a98bbc7e662a2829b7aa3ce6 (diff)
chats: more functions, less structures
git-svn-id: http://svn.miranda-ng.org/main/trunk@17309 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/tox_chatrooms.cpp10
1 files changed, 4 insertions, 6 deletions
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);
}
}
}