summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r--protocols/Steam/src/steam_proto.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index a6bef00d29..655343095d 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -152,14 +152,7 @@ int CSteamProto::AuthRequest(MCONTACT hContact, const wchar_t*)
{
if (IsOnline() && hContact) {
UINT hAuth = InterlockedIncrement(&hAuthProcess);
-
- SendAuthParam *param = (SendAuthParam*)mir_calloc(sizeof(SendAuthParam));
- param->hContact = hContact;
- param->hAuth = (HANDLE)hAuth;
-
- ptrA sessionId(getStringA("SessionID"));
- ptrA who(getStringA(hContact, DBKEY_STEAM_ID));
- SendRequest(new AddFriendRequest(m_szAccessToken, sessionId, m_iSteamId, who), &CSteamProto::OnFriendAdded, param);
+ SendUserAddRequest(GetId(hContact, DBKEY_STEAM_ID));
return hAuth;
}
@@ -319,11 +312,9 @@ HANDLE CSteamProto::GetAwayMsg(MCONTACT hContact)
bool CSteamProto::OnContactDeleted(MCONTACT hContact, uint32_t)
{
// remove only authorized contacts
- if (!getByte(hContact, "Auth", 0)) {
- ptrA sessionId(getStringA("SessionID"));
- char *who = getStringA(hContact, DBKEY_STEAM_ID);
- SendRequest(new RemoveFriendRequest(m_szAccessToken, sessionId, m_iSteamId, who), &CSteamProto::OnFriendRemoved, (void*)who);
- }
+ if (!getByte(hContact, "Auth"))
+ SendUserRemoveRequest(hContact);
+
return true;
}