diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-09 20:00:47 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-09 20:00:47 +0300 |
commit | dbc48cc0ec4df774c257d5175d62bce16e2437e3 (patch) | |
tree | 525937d7b3e549bb75a817571dcecc0f7e32f82d /protocols/IRCG | |
parent | 4d29366657d2ee93db4913a5a07af0d26820c058 (diff) |
PROTO_INTERFACE::OnContactDeleted to be able to block the contact's deletion
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/ircproto.h | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/protocols/IRCG/src/ircproto.h b/protocols/IRCG/src/ircproto.h index 2a170fdfe5..8128bf0564 100644 --- a/protocols/IRCG/src/ircproto.h +++ b/protocols/IRCG/src/ircproto.h @@ -70,7 +70,7 @@ struct CIrcProto : public PROTO<CIrcProto> int SetAwayMsg(int m_iStatus, const wchar_t *msg) override; void OnBuildProtoMenu(void) override; - void OnContactDeleted(MCONTACT) override; + bool OnContactDeleted(MCONTACT) override; MWindow OnCreateAccMgrUI(MWindow) override; void OnModulesLoaded() override; void OnShutdown() override; diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 62b8a46677..b2aa2604a8 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -166,10 +166,10 @@ INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam) return 0;
}
-void CIrcProto::OnContactDeleted(MCONTACT hContact)
+bool CIrcProto::OnContactDeleted(MCONTACT hContact)
{
if (!hContact)
- return;
+ return false;
DBVARIANT dbv;
if (!getWString(hContact, "Nick", &dbv)) {
@@ -195,6 +195,7 @@ void CIrcProto::OnContactDeleted(MCONTACT hContact) db_free(&dbv);
}
+ return true;
}
INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM)
|