summaryrefslogtreecommitdiff
path: root/plugins/QuickMessages/src/Utils.cpp
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/QuickMessages/src/Utils.cpp
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/QuickMessages/src/Utils.cpp')
-rw-r--r--plugins/QuickMessages/src/Utils.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index 7878317d5c..9067c7ac12 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -397,7 +397,6 @@ TCHAR* ParseString(MCONTACT hContact, TCHAR* ptszQValIn, TCHAR* ptszText, TCHAR*
TCHAR* p = NULL;
int NameLenght = 0;
TCHAR* ptszName = NULL;
- CONTACTINFO ci;
if (!_tcschr(ptszQValue, varstr))
return ptszQValue;
@@ -499,16 +498,10 @@ TCHAR* ParseString(MCONTACT hContact, TCHAR* ptszQValIn, TCHAR* ptszText, TCHAR*
i = -1;
break;
case 'F':
- memset(&ci, 0, sizeof(CONTACTINFO));
- ci.cbSize = sizeof(CONTACTINFO);
- ci.hContact = hContact;
- ci.dwFlag = CNF_FIRSTNAME | CNF_UNICODE;
- ci.szProto = GetContactProto(hContact);
-
- if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci))
+ ptszName = Contact_GetInfo(CNF_FIRSTNAME, hContact);
+ if (ptszName == NULL)
break;
- NameLenght = (int)mir_tstrlen(ci.pszVal);
- ptszName = ci.pszVal;
+ NameLenght = (int)mir_tstrlen(ptszName);
p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR));
if (!p) {
mir_free(ptszName);
@@ -531,16 +524,11 @@ TCHAR* ParseString(MCONTACT hContact, TCHAR* ptszQValIn, TCHAR* ptszText, TCHAR*
i = -1;
break;
case 'L':
- memset(&ci, 0, sizeof(CONTACTINFO));
- ci.cbSize = sizeof(CONTACTINFO);
- ci.hContact = hContact;
- ci.dwFlag = CNF_LASTNAME | CNF_UNICODE;
- ci.szProto = GetContactProto(hContact);
-
- if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci))
+ ptszName = Contact_GetInfo(CNF_LASTNAME, hContact);
+ if (ptszName == NULL)
break;
- NameLenght = (int)mir_tstrlen(ci.pszVal);
- ptszName = ci.pszVal;
+
+ NameLenght = (int)mir_tstrlen(ptszName);
p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR));
if (!p) {
mir_free(ptszName);