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/MyDetails/src/data.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'plugins/MyDetails/src/data.cpp') diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 88f9b1eab1..39132d8121 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -284,27 +284,10 @@ int Protocol::GetNickMaxLength() return ret; } -TCHAR *Protocol::GetNick() +TCHAR* Protocol::GetNick() { - // Get it - CONTACTINFO ci = { 0 }; - ci.cbSize = sizeof(ci); - ci.hContact = NULL; - ci.szProto = name; - ci.dwFlag = CNF_DISPLAY; - -#ifdef UNICODE - ci.dwFlag |= CNF_UNICODE; -#endif - - if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)& ci)) { - // CNF_DISPLAY always returns a string type - lcopystr(nickname, ci.pszVal, _countof(nickname)); - mir_free(ci.pszVal); - } - else - lcopystr(nickname, _T(""), _countof(nickname)); - + ptrT nick(Contact_GetInfo(CNF_DISPLAY, NULL, name)); + lcopystr(nickname, (nick != NULL) ? nick : _T(""), _countof(nickname)); return nickname; } -- cgit v1.2.3