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_*) --- protocols/MSN/src/msn.cpp | 3 --- protocols/MSN/src/msn_mail.cpp | 4 ++-- protocols/MSN/src/msn_menu.cpp | 2 +- protocols/MSN/src/msn_misc.cpp | 4 ++-- protocols/MSN/src/msn_svcs.cpp | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) (limited to 'protocols/MSN/src') diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index 5b39364a1d..2dc0977d74 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -25,7 +25,6 @@ along with this program. If not, see . #include "version.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; ///////////////////////////////////////////////////////////////////////////////////////// // Initialization routines @@ -83,8 +82,6 @@ static int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); MsnInitIcons(); diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 30262e49c5..fc003304bd 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -282,7 +282,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail); if (hContact) { - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); displayEmailCount(hContact); if (ShowPopup && !getByte("DisableHotmailTray", 1)) { @@ -296,7 +296,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SENDEMAIL); cle.szTooltip.w = tBuffer2; cle.pszService = buf; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 3cf8a94b84..00b0d3384c 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -47,7 +47,7 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM) { MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail); if (hContact) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); MsnInvokeMyURL(true, "http://mail.live.com?rru=inbox"); return 0; diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 8912cc133a..b7a800b6ee 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -742,7 +742,7 @@ void HandlePopupData(PopupData *tData) { if (tData->flags & MSN_HOTMAIL_POPUP) { MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, nullptr); if (hContact) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); if (tData->flags & MSN_ALLOW_ENTER) tData->proto->MsnInvokeMyURL(true, tData->url); } @@ -755,7 +755,7 @@ void RemovePopupData(PopupData *tData) { if (tData != nullptr && (tData->flags & MSN_HOTMAIL_POPUP)) { MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, nullptr); if (hContact) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); } } diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 70ec17fc56..919f92bafc 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -260,7 +260,7 @@ void CMsnProto::OnContactDeleted(MCONTACT hContact) else { char szEmail[MSN_MAX_EMAIL_LEN]; if (MSN_IsMeByContact(hContact, szEmail)) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); if (szEmail[0]) { debugLogA("Deleted Handler Email"); -- cgit v1.2.3