summaryrefslogtreecommitdiff
path: root/src/core/stdauth
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
commita1d6cb7bdc354be0968c6ba5ac4615e14a90eead (patch)
treea1ed17002c33644b3362e6c1e6572f3fa7ef17d7 /src/core/stdauth
parentfef6b799309b5b9d7cbb2845fa27b777477e2a61 (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 'src/core/stdauth')
-rw-r--r--src/core/stdauth/src/auth.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/core/stdauth/src/auth.cpp b/src/core/stdauth/src/auth.cpp
index adb4577ab3..da81b55068 100644
--- a/src/core/stdauth/src/auth.cpp
+++ b/src/core/stdauth/src/auth.cpp
@@ -44,7 +44,6 @@ INT_PTR ShowAddedWindow(WPARAM, LPARAM lParam)
static int AuthEventAdded(WPARAM, LPARAM lParam)
{
- TCHAR szUid[128] = _T("");
TCHAR szTooltip[256];
MEVENT hDbEvent = (MEVENT)lParam;
@@ -66,27 +65,11 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
cli.lParam = lParam;
cli.hDbEvent = hDbEvent;
- CONTACTINFO ci = {};
- ci.cbSize = sizeof(ci);
- ci.hContact = hContact;
- ci.szProto = GetContactProto(hContact);
- ci.dwFlag = CNF_UNIQUEID | CNF_TCHAR;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) {
- switch (ci.type) {
- case CNFT_ASCIIZ:
- _tcsncpy_s(szUid, ci.pszVal, _TRUNCATE);
- mir_free(ci.pszVal);
- break;
-
- case CNFT_DWORD:
- mir_sntprintf(szUid, _T("%u"), ci.dVal);
- break;
- }
- }
+ ptrT szUid(Contact_GetInfo(CNF_UNIQUEID, hContact));
if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
SkinPlaySound("AuthRequest");
- if (szUid[0])
+ if (szUid)
mir_sntprintf(szTooltip, TranslateT("%s requests authorization"), szUid);
else
mir_sntprintf(szTooltip, TranslateT("%u requests authorization"), *(PDWORD)dbei.pBlob);
@@ -97,7 +80,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
}
else if (dbei.eventType == EVENTTYPE_ADDED) {
SkinPlaySound("AddedEvent");
- if (szUid[0])
+ if (szUid)
mir_sntprintf(szTooltip, TranslateT("%s added you to their contact list"), szUid);
else
mir_sntprintf(szTooltip, TranslateT("%u added you to their contact list"), *(PDWORD)dbei.pBlob);