diff options
Diffstat (limited to 'protocols/Steam')
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 25 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.h | 2 |
2 files changed, 9 insertions, 18 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index ec77254b02..191169160b 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -341,23 +341,14 @@ HANDLE CSteamProto::GetAwayMsg(MCONTACT hContact) return (HANDLE)1; } -int CSteamProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM) +void CSteamProto::OnContactDeleted(MCONTACT hContact) { - switch (eventType) { - case EV_PROTO_ONCONTACTDELETED: - if (IsOnline()) { - MCONTACT hContact = (MCONTACT)wParam; - // remove only authorized contacts - if (!getByte(hContact, "Auth", 0)) { - ptrA token(getStringA("TokenSecret")); - ptrA sessionId(getStringA("SessionID")); - ptrA steamId(getStringA("SteamID")); - char *who = getStringA(hContact, "SteamID"); - PushRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who); - } - } - return 0; + // remove only authorized contacts + if (!getByte(hContact, "Auth", 0)) { + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + ptrA steamId(getStringA("SteamID")); + char *who = getStringA(hContact, "SteamID"); + PushRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who); } - - return 1; }
\ No newline at end of file diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index ef971cb2e9..4298d45737 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -74,7 +74,7 @@ public: int UserIsTyping(MCONTACT hContact, int type) override;
- int OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) override;
+ void OnContactDeleted(MCONTACT) override;
void OnModulesLoaded() override;
// menus
|