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.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index e4668ebe38..f2878659f0 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -386,15 +386,21 @@ int __cdecl CSteamProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM
case EV_PROTO_ONCONTACTDELETED:
if (IsOnline())
{
+ MCONTACT hContact = (MCONTACT)wParam;
+
ptrA token(getStringA("TokenSecret"));
ptrA sessionId(getStringA("SessionID"));
ptrA steamId(getStringA("SteamID"));
- char *who = getStringA(wParam, "SteamID");
+ ptrA who(getStringA(hContact, "SteamID"));
+
+ // Don't request delete contact from server when we're not friends anyway
+ if (getByte(hContact, "Auth", 0) != 0)
+ return 0;
PushRequest(
new SteamWebApi::RemoveFriendRequest(token, sessionId, steamId, who),
&CSteamProto::OnFriendRemoved,
- who);
+ (void*)hContact);
}
return 0;