diff options
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp | 22 |
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) |