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/AvatarHistory/src | |
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/AvatarHistory/src')
-rw-r--r-- | plugins/AvatarHistory/src/utils.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 637458b60d..39b4db8534 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -77,35 +77,6 @@ void ConvertToFilename(TCHAR *str, size_t size) }
}
-int GetUIDFromHContact(MCONTACT contact, TCHAR* uinout, int uinout_len)
-{
- bool found = true;
-
- CONTACTINFO cinfo = { sizeof(cinfo) };
- cinfo.hContact = contact;
- cinfo.dwFlag = CNF_UNIQUEID | CNF_TCHAR;
- if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&cinfo) == 0) {
- if (cinfo.type == CNFT_ASCIIZ) {
- mir_tstrncpy(uinout, cinfo.pszVal, uinout_len);
- // It is up to us to free the string
- // The catch? We need to use Miranda's free(), not our CRT's :)
- mir_free(cinfo.pszVal);
- }
- else if (cinfo.type == CNFT_DWORD)
- _itot(cinfo.dVal,uinout,10);
- else if (cinfo.type == CNFT_WORD)
- _itot(cinfo.wVal,uinout,10);
- else
- found = false;
- }
- else found = false;
-
- if (!found)
- mir_tstrncpy(uinout, TranslateT("Unknown UIN"), uinout_len);
-
- return 0;
-}
-
TCHAR* GetExtension(TCHAR *file)
{
if (file == NULL) return _T("");
@@ -144,7 +115,8 @@ TCHAR* GetContactFolder(TCHAR *fn, MCONTACT hContact) GetProtocolFolder(fn, proto);
TCHAR uin[MAX_PATH];
- GetUIDFromHContact(hContact, uin, _countof(uin));
+ ptrT id(Contact_GetInfo(CNF_UNIQUEID, hContact, proto));
+ _tcsncpy_s(uin, (id == NULL) ? TranslateT("Unknown UIN") : id, _TRUNCATE);
ConvertToFilename(uin, MAX_PATH); //added so that weather id's like "yw/CI0000" work
mir_sntprintf(fn, MAX_PATH, _T("%s\\%s"), fn, uin);
CreateDirectoryTreeT(fn);
|