diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-22 00:55:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-22 00:57:16 +0300 |
commit | d28931ebdfc4ff561d05ab000aee4cbb5ac24d62 (patch) | |
tree | e5cfd83eb231df123a3d744106a4e9b521fba409 /protocols/Steam/src | |
parent | 921f870dd0feec3230a8634abbd85c556e9f3d22 (diff) |
OnEvent(EV_PROTO_ONCONTACTDELETED) => PROTO_INTERFACE::OnContactDeleted
Diffstat (limited to 'protocols/Steam/src')
-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
|