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/TrafficCounter/src/TrafficCounter.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/TrafficCounter/src') diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index f0d3703806..a49d09d34d 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -29,7 +29,6 @@ int NumberOfAccounts; HWND TrafficHwnd; CMPlugin g_plugin; -CLIST_INTERFACE *pcli; BOOL bPopupExists = FALSE, bVariablesExists = FALSE, bTooltipExists = FALSE; @@ -225,7 +224,7 @@ int TrafficCounter_PaintCallbackProc(HWND hWnd, HDC hDC, RECT*, HRGN, DWORD, voi int TrafficCounter_Draw(HWND hwnd, HDC hDC) { if (hwnd == (HWND)-1) return 0; - if (GetParent(hwnd) == pcli->hwndContactList) + if (GetParent(hwnd) == g_CLI.hwndContactList) return PaintTrafficCounterWindow(hwnd, hDC); else InvalidateRect(hwnd, nullptr, FALSE); @@ -1142,15 +1141,13 @@ static int TrafficCounterModulesLoaded(WPARAM, LPARAM) HookEvent(ME_NETLIB_FASTRECV, TrafficRecv); HookEvent(ME_NETLIB_FASTSEND, TrafficSend); - CreateTrafficWindow(pcli->hwndContactList); + CreateTrafficWindow(g_CLI.hwndContactList); UpdateFonts(0, 0); //Load and create fonts here return 0; } extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - HookEvent(ME_OPT_INITIALISE, TrafficCounterOptInitialise); HookEvent(ME_SYSTEM_MODULESLOADED, TrafficCounterModulesLoaded); HookEvent(ME_PROTO_ACK, ProtocolAckHook); -- cgit v1.2.3