From a1d6cb7bdc354be0968c6ba5ac4615e14a90eead Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 May 2016 17:21:08 +0000 Subject: these tons of code aren't needed anymore... git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StopSpamMod/src/utilities.cpp | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'plugins/StopSpamMod/src') 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) -- cgit v1.2.3