summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/src
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/MyDetails/src
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/MyDetails/src')
-rw-r--r--plugins/MyDetails/src/data.cpp23
1 files changed, 3 insertions, 20 deletions
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;
}