diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-23 23:29:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-23 23:29:25 +0300 |
commit | 176e52e14fd0358a7f26ca8d7b0205244dfde2e7 (patch) | |
tree | 10da2f8951d20103af0215c38d07ea96ba61c191 /plugins/NewEventNotify | |
parent | 91b13500b47a51f3a284d9f409b7b8dac167a06d (diff) |
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/NewEventNotify')
-rw-r--r-- | plugins/NewEventNotify/src/main.cpp | 3 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/popup.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
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;
}
|