diff options
Diffstat (limited to 'plugins/IEHistory/src/utils.cpp')
-rw-r--r-- | plugins/IEHistory/src/utils.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/plugins/IEHistory/src/utils.cpp b/plugins/IEHistory/src/utils.cpp index d1f7f704bf..d34557b094 100644 --- a/plugins/IEHistory/src/utils.cpp +++ b/plugins/IEHistory/src/utils.cpp @@ -78,23 +78,10 @@ int Info(char *title, char *format, ...) returns the name of a contact */ -TCHAR *GetContactName(MCONTACT contact) +TCHAR* GetContactName(MCONTACT contact) { - CONTACTINFO ctInfo = { sizeof(ctInfo) }; - // if(db_mc_isMeta(contact)) - // contact=db_mc_getMostOnline(contact); - ctInfo.szProto = GetContactProto(contact); - ctInfo.dwFlag = CNF_DISPLAY; -#ifdef _UNICODE - ctInfo.dwFlag += CNF_UNICODE; -#endif - ctInfo.hContact = contact; - if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ctInfo)){ - return NULL; - } - TCHAR* buffer = _tcsdup(ctInfo.pszVal); - mir_free(ctInfo.pszVal); - return buffer; + ptrT name(Contact_GetInfo(CNF_DISPLAY, contact)); + return (name) ? _tcsdup(name) : NULL; } /* |