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/StopSpamMod/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/StopSpamMod/src')
-rwxr-xr-x | plugins/StopSpamMod/src/utilities.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index cc13f07cbd..16265231d2 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -190,36 +190,9 @@ BOOL IsUrlContains(TCHAR * Str) tstring GetContactUid(MCONTACT hContact, tstring Protocol)
{
- tstring Uid;
- TCHAR dUid[32] = { 0 };
- char aUid[32] = { 0 };
char *szProto = mir_utf8encodeW(Protocol.c_str());
- CONTACTINFO ci;
- memset(&ci, 0, sizeof(ci));
-
- ci.hContact = hContact;
- ci.szProto = szProto;
- ci.cbSize = sizeof(ci);
-
- ci.dwFlag = CNF_DISPLAYUID | CNF_TCHAR;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)& ci)) {
- switch (ci.type) {
- case CNFT_ASCIIZ:
- Uid = ci.pszVal;
- mir_free((void *)ci.pszVal);
- break;
- case CNFT_DWORD:
- _itoa_s(ci.dVal, aUid, 32, 10);
- OemToChar(aUid, dUid);
- Uid = dUid;
- break;
- default:
- Uid = _T("");
- break;
- };
- }
- mir_free(szProto);
- return Uid;
+ ptrT uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
+ return (uid) ? uid : _T("");
}
void LogSpamToFile(MCONTACT hContact, tstring message)
|