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/YARelay/src/main.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'plugins/YARelay') diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index fb3e97319e..a39708cbce 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -151,20 +151,11 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent) case 'i': case 'I': { - // get sender's uin - CONTACTINFO ci = { sizeof(ci) }; - ci.dwFlag = CNF_UNIQUEID; - if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci) == 0){ - if (ci.type == CNFT_ASCIIZ) - _tcsncpy_s(buf, ci.pszVal, _TRUNCATE); - else if (ci.type == CNFT_BYTE) - mir_sntprintf(buf, _T("%u"), ci.bVal); - else if (ci.type == CNFT_WORD) - mir_sntprintf(buf, _T("%u"), ci.wVal); - else if (ci.type == CNFT_DWORD) - mir_sntprintf(buf, _T("%u"), ci.dVal); - } - else mir_sntprintf(buf, _T("%p"), hContact); + ptrT id(Contact_GetInfo(CNF_UNIQUEID, NULL)); + if (id != NULL) + _tcsncpy_s(buf, id, _TRUNCATE); + else + mir_sntprintf(buf, _T("%p"), hContact); } szUtfMsg.append(T2Utf(buf)); break; -- cgit v1.2.3