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_*) --- src/core/stduseronline/src/main.cpp | 3 --- src/core/stduseronline/src/useronline.cpp | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/core/stduseronline') diff --git a/src/core/stduseronline/src/main.cpp b/src/core/stduseronline/src/main.cpp index 248bf8077e..4794c2dc21 100644 --- a/src/core/stduseronline/src/main.cpp +++ b/src/core/stduseronline/src/main.cpp @@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadUserOnlineModule(void); CMPlugin g_plugin; -CLIST_INTERFACE* pcli; ///////////////////////////////////////////////////////////////////////////////////////// @@ -53,8 +52,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERON extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - LoadUserOnlineModule(); return 0; } diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index 163b705835..8a0980bbae 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -42,7 +42,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) int lastEvent = (int)db_get_dw(hContact, MODULENAME, "LastEvent", 0); if (lastEvent) { - pcli->pfnRemoveEvent(hContact, lastEvent); + g_CLI.pfnRemoveEvent(hContact, lastEvent); db_set_dw(hContact, MODULENAME, "LastEvent", 0); } } @@ -62,7 +62,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERONLINE, false); cle.pszService = "UserOnline/Description"; cle.szTooltip.w = tooltip; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); IcoLib_ReleaseIcon(cle.hIcon, 0); db_set_dw(cle.hContact, MODULENAME, "LastEvent", (DWORD)cle.hDbEvent); Skin_PlaySound(MODULENAME); -- cgit v1.2.3