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 --- plugins/PasteIt/src/PasteIt.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'plugins/PasteIt/src') diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 6b6a8bd599..c5e08928b4 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -144,12 +144,10 @@ void PasteIt(MCONTACT hContact, int mode) // in chat room. // Next step is to get all protocol sessions and find // one with correct hContact - GC_INFO gci = { 0 }; - GCDEST gcd = { szProto, NULL, GC_EVENT_SENDMESSAGE }; - GCEVENT gce = { sizeof(gce), &gcd }; int cnt = pci->SM_GetCount(szProto); for (int i = 0; i < cnt; i++) { + GC_INFO gci = {}; gci.iItem = i; gci.pszModule = szProto; gci.Flags = GCF_BYINDEX | GCF_HCONTACT | GCF_ID; @@ -159,13 +157,7 @@ void PasteIt(MCONTACT hContact, int mode) // In this place session was finded, gci.pszID contains // session ID, but it is in unicode or ascii format, // depends on protocol wersion - gcd.ptszID = gci.pszID; - gce.bIsMe = TRUE; - gce.dwFlags = GCEF_ADDTOLOG; - gce.ptszText = mir_a2u_cp(pasteToWeb->szFileLink, CP_ACP); - gce.time = time(NULL); - Chat_Event(0, &gce); - mir_free((void*)gce.ptszText); + Chat_SendUserMessage(szProto, gci.pszID, _A2T(pasteToWeb->szFileLink)); break; } } -- cgit v1.2.3