summaryrefslogtreecommitdiff
path: root/plugins/Variables/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
commit10bc9e42dfba6ed8be41199243d688c2e367dc0d (patch)
tree891aca91eeb2feddb6c76498c4eb880689360fe6 /plugins/Variables/src
parent5dac5be47f2d9af8cbceead6511ff4c0fc40bab5 (diff)
MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members
git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src')
-rw-r--r--plugins/Variables/src/contact.cpp2
-rw-r--r--plugins/Variables/src/main.cpp8
-rw-r--r--plugins/Variables/src/parse_miranda.cpp8
3 files changed, 10 insertions, 8 deletions
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 1bd05d180d..f295c0cea0 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -132,7 +132,7 @@ TCHAR* getContactInfoT(BYTE type, MCONTACT hContact)
}
case CCNF_STATUS:
- return mir_tstrdup((TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), GSMDF_UNICODE));
+ return mir_tstrdup(pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0));
case CCNF_INTERNALIP:
case CCNF_EXTERNALIP:
diff --git a/plugins/Variables/src/main.cpp b/plugins/Variables/src/main.cpp
index 2480565a8c..449dc65cde 100644
--- a/plugins/Variables/src/main.cpp
+++ b/plugins/Variables/src/main.cpp
@@ -18,8 +18,8 @@
*/
#include "variables.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
-
int hLangpack = 0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
@@ -31,7 +31,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaPluginInfoEx - returns the extended information about a plugin
-PLUGININFOEX pluginInfoEx = {
+PLUGININFOEX pluginInfoEx =
+{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -55,7 +56,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP( &pluginInfoEx );
+ mir_getLP(&pluginInfoEx);
+ mir_getCLI();
LoadVarModule();
return 0;
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index d66ed6d3c1..8f76d91169 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -25,7 +25,7 @@ static TCHAR* parseCodeToStatus(ARGUMENTSINFO *ai)
return NULL;
unsigned int status = ttoi(ai->targv[1]);
- TCHAR *szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
if (szStatus != NULL)
return mir_tstrdup(szStatus);
@@ -376,7 +376,7 @@ static TCHAR* parseLastSeenStatus(ARGUMENTSINFO *ai)
if (status == 0)
return NULL;
- TCHAR *szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
if (szStatus != NULL)
return mir_tstrdup(szStatus);
@@ -407,7 +407,7 @@ static TCHAR* parseMyStatus(ARGUMENTSINFO *ai)
else
status = CallProtoService(_T2A(ai->targv[1]), PS_GETSTATUS, 0, 0);
- TCHAR *szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
return (szStatus != NULL) ? mir_tstrdup(szStatus) : NULL;
}
@@ -700,7 +700,7 @@ static TCHAR *parseContactNameString(ARGUMENTSINFO *ai)
return NULL;
ai->flags |= AIF_DONTPARSE;
- TCHAR *ret = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ai->fi->hContact, GCDNF_TCHAR);
+ TCHAR *ret = (TCHAR*)pcli->pfnGetContactDisplayName(ai->fi->hContact, 0);
return (ret == NULL) ? NULL : mir_tstrdup(ret);
}