summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_std.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-16 18:15:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-16 18:15:16 +0000
commit8a59f88f48312eb877347a233b0a6ec11c9ab550 (patch)
tree8c9724efe668b5744bd37fe6ae3b45330a53b742 /protocols/MSN/src/msn_std.cpp
parent8148930684c823e526ab8092b33c129a8b17db74 (diff)
MSN protocol's death-scream
git-svn-id: http://svn.miranda-ng.org/main/trunk@10998 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_std.cpp')
-rw-r--r--protocols/MSN/src/msn_std.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp
index b6e2163e4d..c0dfa87833 100644
--- a/protocols/MSN/src/msn_std.cpp
+++ b/protocols/MSN/src/msn_std.cpp
@@ -27,15 +27,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Standard functions
int CMsnProto::getStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result)
-{ return db_get_utf(hContact, m_szModuleName, name, result);
+{
+ return db_get_utf(hContact, m_szModuleName, name, result);
}
int CMsnProto::getStringUtf(const char* name, DBVARIANT* result)
-{ return db_get_utf(NULL, m_szModuleName, name, result);
+{
+ return db_get_utf(NULL, m_szModuleName, name, result);
}
void CMsnProto::setStringUtf(MCONTACT hContact, const char* name, const char* value)
-{ db_set_utf(hContact, m_szModuleName, name, value);
+{
+ db_set_utf(hContact, m_szModuleName, name, value);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -44,17 +47,15 @@ TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact)
{
if (hContact)
return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR);
+
+ 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))
+ return (TCHAR*)ci.pszVal;
else
- {
- 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))
- return (TCHAR*)ci.pszVal;
- else
- return _T("Me");
- }
+ return _T("Me");
}
unsigned MSN_GenRandom(void)