diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-18 17:21:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-18 17:21:08 +0000 |
commit | a1d6cb7bdc354be0968c6ba5ac4615e14a90eead (patch) | |
tree | a1ed17002c33644b3362e6c1e6572f3fa7ef17d7 /plugins/FavContacts/src/contact_cache.cpp | |
parent | fef6b799309b5b9d7cbb2845fa27b777477e2a61 (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/FavContacts/src/contact_cache.cpp')
-rw-r--r-- | plugins/FavContacts/src/contact_cache.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index d35e8c890e..38cd4abb62 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -116,23 +116,13 @@ float CContactCache::getWeight(int rate) static bool AppendInfo(TCHAR *buf, int size, MCONTACT hContact, int info)
{
- CONTACTINFO ci = { 0 };
- ci.cbSize = sizeof(ci);
- ci.hContact = hContact;
- ci.dwFlag = info;
- ci.dwFlag |= CNF_UNICODE;
-
- bool ret = false;
-
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci) && (ci.type == CNFT_ASCIIZ) && ci.pszVal) {
- if (*ci.pszVal && (mir_tstrlen(ci.pszVal) < size - 2)) {
- mir_tstrcpy(buf, ci.pszVal);
- ret = true;
- }
- mir_free(ci.pszVal);
+ ptrT str(Contact_GetInfo(info, hContact));
+ if (str != NULL) {
+ mir_tstrncpy(buf, str, size);
+ return true;
}
- return ret;
+ return false;
}
void CContactCache::TContactInfo::LoadInfo()
|