summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-09 20:00:47 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-09 20:00:47 +0300
commitdbc48cc0ec4df774c257d5175d62bce16e2437e3 (patch)
tree525937d7b3e549bb75a817571dcecc0f7e32f82d /protocols/ICQ-WIM
parent4d29366657d2ee93db4913a5a07af0d26820c058 (diff)
PROTO_INTERFACE::OnContactDeleted to be able to block the contact's deletion
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp3
-rw-r--r--protocols/ICQ-WIM/src/proto.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index 04a2099acf..30bc7ab707 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -156,7 +156,7 @@ void CIcqProto::OnContactAdded(MCONTACT hContact)
}
}
-void CIcqProto::OnContactDeleted(MCONTACT hContact)
+bool CIcqProto::OnContactDeleted(MCONTACT hContact)
{
CMStringW szId(GetUserId(hContact));
if (!isChatRoom(hContact)) {
@@ -166,6 +166,7 @@ void CIcqProto::OnContactDeleted(MCONTACT hContact)
Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, "/buddylist/removeBuddy")
<< AIMSID(this) << WCHAR_PARAM("buddy", szId) << INT_PARAM("allGroups", 1));
+ return true;
}
void CIcqProto::OnReceiveOfflineFile(DB::FILE_BLOB &blob, void *ft)
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h
index a8b2e90eff..c373a6f184 100644
--- a/protocols/ICQ-WIM/src/proto.h
+++ b/protocols/ICQ-WIM/src/proto.h
@@ -422,7 +422,7 @@ class CIcqProto : public PROTO<CIcqProto>
void OnBuildProtoMenu(void) override;
void OnContactAdded(MCONTACT) override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnEventEdited(MCONTACT, MEVENT, const DBEVENTINFO &dbei) override;
void OnMarkRead(MCONTACT, MEVENT) override;