summaryrefslogtreecommitdiff
path: root/plugins/Variables
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
commita1d6cb7bdc354be0968c6ba5ac4615e14a90eead (patch)
treea1ed17002c33644b3362e6c1e6572f3fa7ef17d7 /plugins/Variables
parentfef6b799309b5b9d7cbb2845fa27b777477e2a61 (diff)
these tons of code aren't needed anymore...
git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables')
-rw-r--r--plugins/Variables/src/contact.cpp27
-rw-r--r--plugins/Variables/src/parse_miranda.cpp11
2 files changed, 3 insertions, 35 deletions
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp
index 7ab46f484e..88b93ea931 100644
--- a/plugins/Variables/src/contact.cpp
+++ b/plugins/Variables/src/contact.cpp
@@ -164,32 +164,7 @@ TCHAR* getContactInfoT(BYTE type, MCONTACT hContact)
break;
}
- CONTACTINFO ci = { sizeof(ci) };
- ci.hContact = hContact;
- ci.dwFlag = type | CNF_UNICODE;
- CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci);
-
- char szVal[16];
- memset(szVal, '\0', sizeof(szVal));
- switch (ci.type) {
- case CNFT_BYTE:
- if (type == CNF_GENDER) {
- szVal[0] = (char)ci.bVal; szVal[1] = 0;
- return mir_a2t(szVal);
- }
- return itot(ci.bVal);
-
- case CNFT_WORD:
- return itot(ci.wVal);
-
- case CNFT_DWORD:
- return itot(ci.dVal);
-
- case CNFT_ASCIIZ:
- return ci.pszVal;
- }
-
- return NULL;
+ return Contact_GetInfo(type, hContact);
}
// MS_VARS_GETCONTACTFROMSTRING
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index e6431a19cb..42a9762bd4 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -361,15 +361,8 @@ static TCHAR* parseProtoInfo(ARGUMENTSINFO *ai)
if (INT_PTR(szRes) == CALLSERVICE_NOTFOUND)
return NULL;
}
- else if (!mir_tstrcmp(ai->targv[2], _T(STR_PINICK))) {
- CONTACTINFO ci;
- ci.cbSize = sizeof(CONTACTINFO);
- ci.dwFlag = CNF_DISPLAY | CNF_UNICODE;
- ci.hContact = NULL;
- ci.szProto = szProto;
- CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci);
- tszRes = ci.pszVal;
- }
+ else if (!mir_tstrcmp(ai->targv[2], _T(STR_PINICK)))
+ tszRes = Contact_GetInfo(CNF_DISPLAY, NULL, szProto);
if (szRes == NULL && tszRes == NULL)
return NULL;