From 176e52e14fd0358a7f26ca8d7b0205244dfde2e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 May 2018 23:29:25 +0300 Subject: no need to initialize pcli variable in each plugin (only in Clist_*) --- plugins/NewEventNotify/src/main.cpp | 3 --- plugins/NewEventNotify/src/popup.cpp | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/NewEventNotify/src') diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index ec4acf3996..08e6141ce4 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -31,7 +31,6 @@ PLUGIN_OPTIONS pluginOptions; //--------------------------- //---Some global variables for the plugin -CLIST_INTERFACE *pcli; CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// @@ -136,8 +135,6 @@ extern "C" __declspec(dllexport) int Load(void) HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit); HookEvent(ME_OPT_INITIALISE, HookedOptions); - pcli = Clist_GetInterface(); - OptionsInit(&pluginOptions); return 0; } diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index b0d7d859c2..9ce4dd2a41 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -85,7 +85,7 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) return 0; for (int idx = 0;; idx++) { - CLISTEVENT *cle = pcli->pfnGetEvent(pdata->hContact, idx); + CLISTEVENT *cle = g_CLI.pfnGetEvent(pdata->hContact, idx); if (cle == nullptr) break; @@ -104,7 +104,7 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) EVENT_DATA_EX *eventData = pdata->firstEventData; pdata->iLock = 1; while (eventData) { - pcli->pfnRemoveEvent(pdata->hContact, eventData->hEvent); + g_CLI.pfnRemoveEvent(pdata->hContact, eventData->hEvent); db_event_markRead(pdata->hContact, eventData->hEvent); eventData = eventData->next; } -- cgit v1.2.3