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/BuddyExpectator/src/BuddyExpectator.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'plugins/BuddyExpectator/src') diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 4b76e9e252..00f1e38127 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -21,7 +21,6 @@ #include "stdafx.h" -CLIST_INTERFACE *pcli; CMPlugin g_plugin; DWORD timer_id = 0; @@ -165,14 +164,14 @@ LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa switch (message) { case WM_COMMAND: if (HIWORD(wParam) == STN_CLICKED) { - pcli->pfnRemoveEvent(PUGetContact(hWnd), 0); + g_CLI.pfnRemoveEvent(PUGetContact(hWnd), 0); CallServiceSync("BuddyExpectator/actionReturned", PUGetContact(hWnd), 0); PUDeletePopup(hWnd); } break; case WM_CONTEXTMENU: - pcli->pfnRemoveEvent(PUGetContact(hWnd), 0); + g_CLI.pfnRemoveEvent(PUGetContact(hWnd), 0); setLastSeen(PUGetContact(hWnd)); PUDeletePopup(hWnd); break; @@ -190,14 +189,14 @@ LRESULT CALLBACK PopupDlgProcNoSet(HWND hWnd, UINT message, WPARAM wParam, LPARA switch (message) { case WM_COMMAND: if (HIWORD(wParam) == STN_CLICKED) { - pcli->pfnRemoveEvent(PUGetContact(hWnd), 0); + g_CLI.pfnRemoveEvent(PUGetContact(hWnd), 0); CallServiceSync("BuddyExpectator/actionStillAbsent", (WPARAM)PUGetContact(hWnd), 0); PUDeletePopup(hWnd); } break; case WM_CONTEXTMENU: - pcli->pfnRemoveEvent(PUGetContact(hWnd), 0); + g_CLI.pfnRemoveEvent(PUGetContact(hWnd), 0); PUDeletePopup(hWnd); break; @@ -287,7 +286,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message) wchar_t tmpMsg[512]; mir_snwprintf(tmpMsg, L"%s %s", nick, message); cle.szTooltip.w = tmpMsg; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } @@ -325,7 +324,7 @@ void GoneNotify(MCONTACT hContact, wchar_t *message) mir_snwprintf(tmpMsg, L"%s %s", nick, message); cle.szTooltip.w = tmpMsg; cle.flags = CLEF_UNICODE; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } @@ -648,8 +647,6 @@ int onShutdown(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - InitOptions(); CreateServiceFunction("BuddyExpectator/actionReturned", ContactReturnedAction); -- cgit v1.2.3