summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Steam/src/steam_contacts.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index f92fd64869..d751f62c78 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -92,29 +92,31 @@ void CSteamProto::OnGotFriendInfo(const CMsgClientPersonaState &reply, const CMs
// set name
if (F->player_name) {
CMStringW realName(Utf2T(F->player_name));
- if (!realName.IsEmpty()) {
- // set a nickname for group chat user?
- if (si) {
- CMStringW wszUserId(FORMAT, L"%lld", F->friendid);
- GCEVENT gce = { si, GC_EVENT_NICK };
- gce.pszUID.w = wszUserId;
- gce.pszText.w = realName;
- Chat_Event(&gce);
- continue;
- }
- int pos = realName.Find(L' ', 1);
- if (pos != -1) {
- setWString(hContact, "FirstName", realName.Mid(0, pos));
- setWString(hContact, "LastName", realName.Mid(pos + 1));
- }
- else {
- setWString(hContact, "FirstName", realName);
- delSetting(hContact, "LastName");
- }
+ // set a nickname for group chat user?
+ if (si) {
+ CMStringW wszUserId(FORMAT, L"%lld", F->friendid);
+ GCEVENT gce = { si, GC_EVENT_NICK };
+ gce.pszUID.w = wszUserId;
+ gce.pszText.w = realName;
+ Chat_Event(&gce);
+ continue;
+ }
+
+ setWString(hContact, "Nick", realName);
+
+ int pos = realName.Find(L' ', 1);
+ if (pos != -1) {
+ setWString(hContact, "FirstName", realName.Mid(0, pos));
+ setWString(hContact, "LastName", realName.Mid(pos + 1));
+ }
+ else {
+ setWString(hContact, "FirstName", realName);
+ delSetting(hContact, "LastName");
}
}
else {
+ delSetting(hContact, "Nick");
delSetting(hContact, "FirstName");
delSetting(hContact, "LastName");
}