diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-16 19:43:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-16 19:43:24 +0000 |
commit | 0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 (patch) | |
tree | 700937499ee66952d1ca5b92928fc9ec3b034447 /plugins/PasteIt/src/PasteIt.cpp | |
parent | 7a7a6637021d78ad995f3e21e9743fae69bd2562 (diff) |
- chats services replaces with functions;
- chat calls switched from CallServiceSync to direct calls everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@17305 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PasteIt/src/PasteIt.cpp')
-rw-r--r-- | plugins/PasteIt/src/PasteIt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 6ebee5236d..6b6a8bd599 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -54,6 +54,7 @@ PLUGININFOEX pluginInfo = { static IconItem icon = { LPGEN("Paste It"), "PasteIt_main", IDI_MENU };
int hLangpack = 0;
+CHAT_MANAGER *pci;
BOOL APIENTRY DllMain(HMODULE hModule, DWORD, LPVOID)
{
@@ -146,13 +147,13 @@ void PasteIt(MCONTACT hContact, int mode) GC_INFO gci = { 0 };
GCDEST gcd = { szProto, NULL, GC_EVENT_SENDMESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
- int cnt = (int)CallService(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)szProto);
+ int cnt = pci->SM_GetCount(szProto);
for (int i = 0; i < cnt; i++)
{
gci.iItem = i;
gci.pszModule = szProto;
gci.Flags = GCF_BYINDEX | GCF_HCONTACT | GCF_ID;
- CallService(MS_GC_GETINFO, 0, (LPARAM)&gci);
+ Chat_GetInfo(&gci);
if (gci.hContact == hContact)
{
// In this place session was finded, gci.pszID contains
@@ -163,7 +164,7 @@ void PasteIt(MCONTACT hContact, int mode) gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszText = mir_a2u_cp(pasteToWeb->szFileLink, CP_ACP);
gce.time = time(NULL);
- CallService(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
mir_free((void*)gce.ptszText);
break;
}
@@ -399,6 +400,7 @@ int ModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ pci = Chat_GetInterface();
Icon_Register(hInst, LPGEN("Paste It"), &icon, 1);
|