summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/steam_thread.cpp')
-rw-r--r--protocols/Steam/src/steam_thread.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/protocols/Steam/src/steam_thread.cpp b/protocols/Steam/src/steam_thread.cpp
index a4adad5ba8..75c60577fd 100644
--- a/protocols/Steam/src/steam_thread.cpp
+++ b/protocols/Steam/src/steam_thread.cpp
@@ -8,7 +8,7 @@ void CSteamProto::PollStatus(const char *token, const char *sessionId, UINT32 me
return;
CMStringA updatedIds;
- for (int i = 0; i < pollResult->GetItemCount(); i++)
+ for (size_t i = 0; i < pollResult->GetItemCount(); i++)
{
const SteamWebApi::PollApi::PoolItem *item = pollResult->GetAt(i);
switch (item->GetType())
@@ -66,30 +66,19 @@ void CSteamProto::PollStatus(const char *token, const char *sessionId, UINT32 me
const wchar_t *nickname = state->GetNickname();
if (IsMe(steamId))
- {
- const wchar_t *oldNickname = getWStringA("Nick");
- if (lstrcmp(oldNickname, nickname) && lstrlen(nickname))
- setWString("Nick", nickname);
-
SetStatus(status);
- }
else
{
MCONTACT hContact = FindContact(steamId);
if (hContact)
- {
- const wchar_t *oldNickname = getWStringA(hContact, "Nick");
- if (lstrcmp(oldNickname, nickname) && lstrlen(nickname))
- setWString(hContact, "Nick", nickname);
-
SetContactStatus(hContact, status);
- }
- if (updatedIds.IsEmpty())
- updatedIds.Append(steamId);
- else
- updatedIds.AppendFormat(",%s", steamId);
}
+
+ if (updatedIds.IsEmpty())
+ updatedIds.Append(steamId);
+ else
+ updatedIds.AppendFormat(",%s", steamId);
}
break;
}