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/JabberG/src/jabber_events.cpp | 7 +++---- protocols/JabberG/src/jabber_proto.cpp | 3 --- protocols/JabberG/src/jabber_proto.h | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index ea3d7ab58d..3316875e72 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -31,14 +31,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ///////////////////////////////////////////////////////////////////////////////////////// // OnContactDeleted - processes a contact deletion -int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM) +void CJabberProto::OnContactDeleted(MCONTACT hContact) { if (!m_bJabberOnline) // should never happen - return 0; + return; ptrW jid(getWStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid")); if (jid == nullptr) - return 0; + return; if (ListGetItemPtr(LIST_ROSTER, jid)) { if (!wcschr(jid, '@')) { @@ -55,7 +55,6 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM) ListRemove(LIST_ROSTER, jid); } - return 0; } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 801cb5bd0f..9a29ec47be 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -1330,9 +1330,6 @@ int CJabberProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam case EV_PROTO_ONMENU: MenuInit(); break; - - case EV_PROTO_ONCONTACTDELETED: - return OnContactDeleted(wParam, lParam); } return 1; } diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 4f08e9219a..f63750259d 100755 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -111,6 +111,7 @@ struct CJabberProto : public PROTO, public IJabberInterface int UserIsTyping(MCONTACT hContact, int type) override; int OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) override; + void OnContactDeleted(MCONTACT) override; void OnModulesLoaded() override; void OnShutdown() override; @@ -120,7 +121,6 @@ struct CJabberProto : public PROTO, public IJabberInterface //====| Events |====================================================================== void __cdecl OnAddContactForever(MCONTACT hContact); - int __cdecl OnContactDeleted(WPARAM, LPARAM); int __cdecl OnDbSettingChanged(WPARAM, LPARAM); int __cdecl OnIdleChanged(WPARAM, LPARAM); int __cdecl OnLangChanged(WPARAM, LPARAM); -- cgit v1.2.3