From a1d6cb7bdc354be0968c6ba5ac4615e14a90eead Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 May 2016 17:21:08 +0000 Subject: these tons of code aren't needed anymore... git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEHistory/src/utils.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'plugins/IEHistory/src') 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; } /* -- cgit v1.2.3