summaryrefslogtreecommitdiff
path: root/protocols
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 /protocols
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 'protocols')
-rw-r--r--protocols/MSN/src/msn_std.cpp15
-rw-r--r--protocols/Tlen/src/tlen_muc.cpp18
2 files changed, 10 insertions, 23 deletions
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp
index 40fca05dc3..4df80b1c65 100644
--- a/protocols/MSN/src/msn_std.cpp
+++ b/protocols/MSN/src/msn_std.cpp
@@ -48,16 +48,13 @@ TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact)
if (hContact)
return (TCHAR*)pcli->pfnGetContactDisplayName(WPARAM(hContact), 0);
- CONTACTINFO ci = { 0 };
- ci.cbSize = sizeof(ci);
- ci.dwFlag = CNF_DISPLAY | CNF_TCHAR;
- ci.szProto = m_szModuleName;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) {
- if (m_DisplayNameCache) mir_free(m_DisplayNameCache);
- return (TCHAR*)m_DisplayNameCache = ci.pszVal;
+ TCHAR *str = Contact_GetInfo(CNF_DISPLAY, NULL, m_szModuleName);
+ if (str != NULL) {
+ mir_free(m_DisplayNameCache);
+ return m_DisplayNameCache = str;
}
- else
- return _T("Me");
+
+ return _T("Me");
}
unsigned MSN_GenRandom(void)
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp
index b429c2fee6..24ab3ec60b 100644
--- a/protocols/Tlen/src/tlen_muc.cpp
+++ b/protocols/Tlen/src/tlen_muc.cpp
@@ -72,20 +72,10 @@ static char *getDisplayName(TlenProtocol *proto, const char *id)
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, "%s@%s", id, dbv.pszVal);
db_free(&dbv);
- if (((hContact=TlenHContactFromJID(proto, jid)) != NULL) || !mir_strcmp(id, proto->threadData->username)) {
- CONTACTINFO ci = { sizeof(ci) };
- ci.hContact = hContact;
- ci.szProto = (char *)proto->m_szModuleName;
- ci.dwFlag = CNF_DISPLAY;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci)) {
- if (ci.type == CNFT_ASCIIZ) {
- if (ci.pszVal) {
- char* str = mir_t2a(ci.pszVal);
- mir_free(ci.pszVal);
- return str;
- }
- }
- }
+ if (((hContact = TlenHContactFromJID(proto, jid)) != NULL) || !mir_strcmp(id, proto->threadData->username)) {
+ ptrT szName(Contact_GetInfo(CNF_DISPLAY, hContact, proto->m_szModuleName));
+ if (szName)
+ return mir_t2a(szName);
}
}
return mir_strdup(id);