diff options
Diffstat (limited to 'protocols/MSN/src/msn_std.cpp')
-rw-r--r-- | protocols/MSN/src/msn_std.cpp | 27 |
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)
|