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/Msg_Export | |
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/Msg_Export')
-rwxr-xr-x | plugins/Msg_Export/src/utils.cpp | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 42df6bda09..b5d13d04af 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -973,23 +973,9 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) for (int nCur = 0; nCur < 9; nCur++)
ReplaceAll(output, pszReplaceList[nCur], _DBGetString(hContact, sProto.c_str(), pszReplaceListA[nCur], _T("")));
- CONTACTINFO ci = {};
- ci.cbSize = sizeof(ci);
- ci.hContact = hContact;
- ci.szProto = (char*)sProto.c_str();
- ci.dwFlag = CNF_UNIQUEID | CNF_TCHAR;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) { - switch (ci.type) { - case CNFT_ASCIIZ: - ReplaceAll(output, _T("%UIN%"), ci.pszVal);
- mir_free(ci.pszVal); - break; - case CNFT_DWORD: - mir_sntprintf(szTemp, _T("%u"), ci.dVal); - ReplaceAll(output, _T("%UIN%"), szTemp);
- break; - } - }
+ ptrT id(Contact_GetInfo(CNF_UNIQUEID, hContact, sProto.c_str()));
+ if (id != NULL)
+ ReplaceAll(output, _T("%UIN%"), id);
mir_sntprintf(szTemp, _T("%d"), db_get_w(hContact, sProto.c_str(), "Age", 0));
ReplaceAll(output, _T("%Age%"), szTemp);
@@ -1447,9 +1433,6 @@ void SaveSettings() TCHAR* GetMyOwnNick(MCONTACT hContact)
{
- CONTACTINFO ci = { 0 };
- ci.cbSize = sizeof(ci);
- ci.szProto = GetContactProto(hContact);
- ci.dwFlag = CNF_DISPLAY | CNF_TCHAR;
- return CallService(MS_CONTACT_GETCONTACTINFO, 0, LPARAM(&ci)) ? mir_tstrdup(TranslateT("No_Nick")) : ci.pszVal;
+ TCHAR *p = Contact_GetInfo(CNF_DISPLAY, NULL, GetContactProto(hContact));
+ return (p != NULL) ? p : mir_tstrdup(TranslateT("No_Nick"));
}
|