diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-04 14:00:27 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-04 14:00:27 +0000 |
commit | e89765da6a2c6e5efb6e019ebd037e0d3f1565b0 (patch) | |
tree | d4ba2c6bf520c313a2975240fc12040a9d4ce761 /protocols/Steam/src/steam_proto.cpp | |
parent | f16b4030068686b9f8bc1c4d22cd8c52b78a21d0 (diff) |
Steam: Don't try delete contact from server when we're not friends anyway
git-svn-id: http://svn.miranda-ng.org/main/trunk@11241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 10 |
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;
|