diff options
Diffstat (limited to 'plugins/SecureIM/src')
-rw-r--r-- | plugins/SecureIM/src/crypt_lists.cpp | 5 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_popups.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/main.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp index 25e004f09d..3eeabe0721 100644 --- a/plugins/SecureIM/src/crypt_lists.cpp +++ b/plugins/SecureIM/src/crypt_lists.cpp @@ -191,12 +191,13 @@ void addMsg2Queue(pUinKey ptr, WPARAM wParam, LPSTR szMsg) void getContactNameA(MCONTACT hContact, LPSTR szName)
{
- mir_strcpy(szName, (LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
+ ptrA dn(mir_u2a((LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0)));
+ mir_strcpy(szName, dn);
}
void getContactName(MCONTACT hContact, LPSTR szName)
{
- mir_wstrcpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE));
+ mir_wstrcpy((LPWSTR)szName, (LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0));
}
void getContactUinA(MCONTACT hContact, LPSTR szUIN)
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp index f6f0a3396c..3bd02356dc 100644 --- a/plugins/SecureIM/src/crypt_popups.cpp +++ b/plugins/SecureIM/src/crypt_popups.cpp @@ -41,7 +41,7 @@ void showPopup(LPCSTR lpzText, MCONTACT hContact, HICON hIcon, UINT type) POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIcon;
- LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GSMDF_UNICODE);
+ LPWSTR lpwzContactName = (LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0);
wcsncpy(ppd.lpwzContactName, lpwzContactName, MAX_CONTACTNAME-1);
LPWSTR lpwzText = mir_a2u(lpzText);
wcsncpy(ppd.lpwzText, TranslateW(lpwzText),MAX_SECONDLINE-1);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 00d11bbb73..97ce846321 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -1,5 +1,6 @@ #include "commonheaders.h"
+CLIST_INTERFACE *pcli;
int hLangpack = 0;
PLUGININFOEX pluginInfoEx = {
@@ -303,6 +304,7 @@ static int onShutdown(WPARAM, LPARAM) extern "C" __declspec(dllexport) int __cdecl Load(void)
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
DisableThreadLibraryCalls(g_hInst);
|