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/SMS/src/main.cpp | 3 --- plugins/SMS/src/receive.cpp | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/SMS/src') diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp index cbff1d1ed4..f2f23f7e68 100644 --- a/plugins/SMS/src/main.cpp +++ b/plugins/SMS/src/main.cpp @@ -28,7 +28,6 @@ Enjoy the code and use it smartly! #include "stdafx.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; SMS_SETTINGS ssSMSSettings; @@ -115,8 +114,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - HookEvent(ME_SYSTEM_MODULESLOADED,OnModulesLoaded); HookEvent(ME_SYSTEM_PRESHUTDOWN,OnPreShutdown); diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index b446b1b437..60d9eab6f6 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -240,7 +240,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS); cle.pszService = szServiceFunction; cle.szTooltip.w = szToolTip; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } } @@ -263,7 +263,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) cle.hIcon = (HICON)LoadImage(ssSMSSettings.hInstance, MAKEINTRESOURCE(iIcon), IMAGE_ICON, 0, 0, LR_SHARED); cle.pszService = szServiceFunction; cle.szTooltip.w = szToolTip; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } } -- cgit v1.2.3