diff options
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index f4fbfb8d65..577a896979 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -70,7 +70,7 @@ CSteamProto::~CSteamProto() MCONTACT CSteamProto::AddToList(int, PROTOSEARCHRESULT* psr) { MCONTACT hContact = NULL; - ptrA steamId(mir_u2a(psr->id)); + ptrA steamId(mir_u2a(psr->id.t)); if (psr->cbSize == sizeof(PROTOSEARCHRESULT)) { if (!FindContact(steamId)) @@ -230,10 +230,10 @@ HANDLE CSteamProto::SearchBasic(const TCHAR* id) int CSteamProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) { - return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, mir_strlen(pre->szMessage), (BYTE*)pre->szMessage); + return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, (DWORD)mir_strlen(pre->szMessage), (BYTE*)pre->szMessage); } -int CSteamProto::SendMsg(MCONTACT hContact, int flags, const char *message) +int CSteamProto::SendMsg(MCONTACT hContact, int, const char *message) { if (!IsOnline()) { @@ -312,26 +312,26 @@ int CSteamProto::SetStatus(int new_status) requestQueue->Start(); - ptrA token(getStringA("TokenSecret"));
- if (mir_strlen(token) > 0)
- {
- PushRequest(
- new LogonRequest(token),
- &CSteamProto::OnLoggedOn);
- }
- else
- {
- ptrA username(mir_urlEncode(ptrA(mir_utf8encodeT(getTStringA("Username")))));
- if (username == NULL || username[0] == '\0')
- {
+ ptrA token(getStringA("TokenSecret")); + if (mir_strlen(token) > 0) + { + PushRequest( + new LogonRequest(token), + &CSteamProto::OnLoggedOn); + } + else + { + ptrA username(mir_urlEncode(ptrA(mir_utf8encodeT(getTStringA("Username"))))); + if (username == NULL || username[0] == '\0') + { m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus);
- return 0;
- }
-
- PushRequest(
- new GetRsaKeyRequest(username),
- &CSteamProto::OnGotRsaKey);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus); + return 0; + } + + PushRequest( + new GetRsaKeyRequest(username), + &CSteamProto::OnGotRsaKey); } } else |