From d28931ebdfc4ff561d05ab000aee4cbb5ac24d62 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Apr 2018 00:55:51 +0300 Subject: OnEvent(EV_PROTO_ONCONTACTDELETED) => PROTO_INTERFACE::OnContactDeleted --- protocols/Steam/src/steam_proto.cpp | 25 ++++++++----------------- protocols/Steam/src/steam_proto.h | 2 +- 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'protocols/Steam') 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 -- cgit v1.2.3