summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import
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/UserInfoEx/src/ex_import
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/UserInfoEx/src/ex_import')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 102fe49b42..a669db5ecd 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -291,25 +291,13 @@ void CExImContactBase::toIni(FILE* file, int modCount)
}
else {
// Proto loaded - GetContactName(hContact,pszProto,0)
- LPSTR pszCI = NULL;
- CONTACTINFO ci = {};
- ci.cbSize = sizeof(ci);
- ci.hContact = _hContact;
- ci.szProto = _pszProto;
- ci.dwFlag = CNF_DISPLAY;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, NULL, (LPARAM)&ci)) {
- // CNF_DISPLAY always returns a string type
- pszCI = (LPSTR)ci.pszVal;
- }
- LPSTR pszUID = uid2String(FALSE);
+ ptrT pszCI(Contact_GetInfo(CNF_DISPLAY, _hContact, _pszProto));
+ ptrA pszUID(uid2String(FALSE));
if (_pszUIDKey && pszUID)
- mir_snprintf(name, "%s *(%s)*<%s>*{%s}*", pszCI, _pszProto, _pszUIDKey, pszUID);
+ mir_snprintf(name, "%S *(%s)*<%s>*{%s}*", pszCI, _pszProto, _pszUIDKey, pszUID);
else
- mir_snprintf(name, "%s (%s)", pszCI, _pszProto);
-
- mir_free(pszCI);
- mir_free(pszUID);
- } // end else (Proto loaded)
+ mir_snprintf(name, "%S (%s)", pszCI, _pszProto);
+ }
// it is not the best solution (but still works if only basic modules export) - need rework
if (modCount > 3)