summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_protoint.h3
-rw-r--r--libs/win32/mir_app.libbin275338 -> 275342 bytes
-rw-r--r--libs/win64/mir_app.libbin274616 -> 274622 bytes
-rw-r--r--protocols/Discord/src/proto.cpp5
-rw-r--r--protocols/Discord/src/proto.h2
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp15
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.h2
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp3
-rw-r--r--protocols/ICQ-WIM/src/proto.h2
-rw-r--r--protocols/IRCG/src/ircproto.h2
-rw-r--r--protocols/IRCG/src/services.cpp5
-rw-r--r--protocols/JabberG/src/jabber_events.cpp7
-rw-r--r--protocols/JabberG/src/jabber_proto.h2
-rw-r--r--protocols/Sametime/src/sametime.cpp3
-rw-r--r--protocols/Sametime/src/sametime_proto.h2
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp3
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h2
-rw-r--r--protocols/Steam/src/steam_proto.cpp3
-rw-r--r--protocols/Steam/src/steam_proto.h2
-rw-r--r--protocols/Tox/src/tox_contacts.cpp8
-rw-r--r--protocols/Tox/src/tox_proto.h2
-rw-r--r--protocols/Twitter/src/contacts.cpp5
-rw-r--r--protocols/Twitter/src/proto.h2
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp9
-rw-r--r--protocols/VKontakte/src/vk_proto.h2
-rw-r--r--src/mir_app/src/mir_app.def2
-rw-r--r--src/mir_app/src/mir_app64.def2
-rw-r--r--src/mir_app/src/proto_interface.cpp6
-rw-r--r--src/mir_core/src/db.cpp3
29 files changed, 58 insertions, 46 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 5351bcb921..d075c1827d 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -261,7 +261,8 @@ public:
virtual void OnContactAdded(MCONTACT);
// called when an account's contact is deleted
- virtual void OnContactDeleted(MCONTACT);
+ // returns true if deletion confirmed or false if not
+ virtual bool OnContactDeleted(MCONTACT);
// called when the Account Manager needs to draw short account's options
virtual MWindow OnCreateAccMgrUI(MWindow hwndParent);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index ad1c864412..95fab5b818 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index b5d800acb8..0a825823ee 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 423242c338..7e55ea5d65 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -625,17 +625,18 @@ int CDiscordProto::OnAccountChanged(WPARAM iAction, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-void CDiscordProto::OnContactDeleted(MCONTACT hContact)
+bool CDiscordProto::OnContactDeleted(MCONTACT hContact)
{
CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID));
if (pUser == nullptr || !m_bOnline)
- return;
+ return false;
if (pUser->channelId)
Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/channels/%lld", pUser->channelId), nullptr));
if (pUser->id)
RemoveFriend(pUser->id);
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h
index 6e62cb0d5a..d6aa55c990 100644
--- a/protocols/Discord/src/proto.h
+++ b/protocols/Discord/src/proto.h
@@ -377,7 +377,7 @@ public:
int SetStatus(int iNewStatus) override;
void OnBuildProtoMenu() override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 67c00622d1..93432deea9 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1197,35 +1197,32 @@ void GaduProto::broadcastnewstatus(int newStatus)
////////////////////////////////////////////////////////////
// When contact is deleted
-void GaduProto::OnContactDeleted(MCONTACT hContact)
+bool GaduProto::OnContactDeleted(MCONTACT hContact)
{
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN);
// Terminate conference if contact is deleted
- if (isChatRoom(hContact) && uin && gc_enabled)
- {
+ if (isChatRoom(hContact) && uin && gc_enabled) {
CMStringW wszRoomId(FORMAT, L"%d", uin);
GGGC *chat = gc_lookup(wszRoomId);
debugLogA("contactdeleted(): Terminating chat %x, id %s from contact list...", chat, wszRoomId.c_str());
- if (chat)
- {
+ if (chat) {
// Destroy chat entry
free(chat->recipients);
list_remove(&chats, chat, 1);
+
// Terminate chat window / shouldn't cascade entry is deleted
Chat_Control(chat->si, SESSION_OFFLINE);
Chat_Terminate(chat->si);
chat->si = nullptr;
}
- return;
}
-
- if (uin && isonline())
- {
+ else if (uin && isonline()) {
gg_EnterCriticalSection(&sess_mutex, "contactdeleted", 25, "sess_mutex", 1);
gg_remove_notify_ex(m_sess, uin, GG_USER_NORMAL);
gg_LeaveCriticalSection(&sess_mutex, "contactdeleted", 25, 1, "sess_mutex", 1);
}
+ return true;
}
////////////////////////////////////////////////////////////
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h
index 5e840893d0..75da3bc4f1 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.h
+++ b/protocols/Gadu-Gadu/src/gg_proto.h
@@ -57,7 +57,7 @@ struct GaduProto : public PROTO<GaduProto>
int UserIsTyping(MCONTACT hContact, int type) 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/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;
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)
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 2dfc7bbf84..8c9b1b8c68 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
-void CJabberProto::OnContactDeleted(MCONTACT hContact)
+bool CJabberProto::OnContactDeleted(MCONTACT hContact)
{
if (!m_bJabberOnline) // should never happen
- return;
+ return false;
ptrA jid(ContactToJID(hContact));
if (jid == nullptr)
- return;
+ return false;
if (ListGetItemPtr(LIST_ROSTER, jid)) {
if (!strchr(jid, '@')) {
@@ -55,6 +55,7 @@ void CJabberProto::OnContactDeleted(MCONTACT hContact)
ListRemove(LIST_ROSTER, jid);
}
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 9078d37f0e..73f7b187a8 100644
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -150,7 +150,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
int UserIsTyping(MCONTACT hContact, int type) override;
void OnBuildProtoMenu(void) override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index 238f559d6b..bb247ccdaa 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -128,10 +128,11 @@ void CSametimeProto::OnShutdown()
LogOut();
}
-void CSametimeProto::OnContactDeleted(MCONTACT hContact)
+bool CSametimeProto::OnContactDeleted(MCONTACT hContact)
{
ContactDeleted(hContact);
ChatDeleted(hContact);
+ return true;
}
void CSametimeProto::SetAllOffline()
diff --git a/protocols/Sametime/src/sametime_proto.h b/protocols/Sametime/src/sametime_proto.h
index 53251ff531..6c3bd27e9e 100644
--- a/protocols/Sametime/src/sametime_proto.h
+++ b/protocols/Sametime/src/sametime_proto.h
@@ -39,7 +39,7 @@ struct CSametimeProto : public PROTO<CSametimeProto>
int UserIsTyping(MCONTACT hContact, int type) override;
void OnShutdown() override;
- void OnContactDeleted(MCONTACT hContact) override;
+ bool OnContactDeleted(MCONTACT hContact) override;
// sametime.cpp
INT_PTR __cdecl GetName(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index 33b108f036..ee2254ff27 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -235,7 +235,7 @@ INT_PTR CSkypeProto::OnGrantAuth(WPARAM hContact, LPARAM)
return 0;
}
-void CSkypeProto::OnContactDeleted(MCONTACT hContact)
+bool CSkypeProto::OnContactDeleted(MCONTACT hContact)
{
if (IsOnline() && hContact) {
if (isChatRoom(hContact))
@@ -243,6 +243,7 @@ void CSkypeProto::OnContactDeleted(MCONTACT hContact)
else
PushRequest(new DeleteContactRequest(getId(hContact)));
}
+ return true;
}
INT_PTR CSkypeProto::BlockContact(WPARAM hContact, LPARAM)
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index d822c123f7..5686aad69c 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -68,7 +68,7 @@ public:
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 OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 2e2eb6faff..5cf5c5908c 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -332,7 +332,7 @@ HANDLE CSteamProto::GetAwayMsg(MCONTACT hContact)
return (HANDLE)1;
}
-void CSteamProto::OnContactDeleted(MCONTACT hContact)
+bool CSteamProto::OnContactDeleted(MCONTACT hContact)
{
// remove only authorized contacts
if (!getByte(hContact, "Auth", 0)) {
@@ -342,4 +342,5 @@ void CSteamProto::OnContactDeleted(MCONTACT hContact)
char *who = getStringA(hContact, DBKEY_STEAM_ID);
SendRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who);
}
+ return true;
}
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h
index 4e6acdfef7..234ae44e88 100644
--- a/protocols/Steam/src/steam_proto.h
+++ b/protocols/Steam/src/steam_proto.h
@@ -284,7 +284,7 @@ public:
int UserIsTyping(MCONTACT hContact, int type) override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnModulesLoaded() override;
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index ec95703156..7349f9ebe5 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -201,20 +201,22 @@ INT_PTR CToxProto::OnGrantAuth(WPARAM hContact, LPARAM)
return 0;
}
-void CToxProto::OnContactDeleted(MCONTACT hContact)
+bool CToxProto::OnContactDeleted(MCONTACT hContact)
{
if (!IsOnline())
- return;
+ return false;
if (!isChatRoom(hContact)) {
int32_t friendNumber = GetToxFriendNumber(hContact);
TOX_ERR_FRIEND_DELETE error;
if (!tox_friend_delete(m_tox, friendNumber, &error)) {
debugLogA(__FUNCTION__": failed to delete friend (%d)", error);
- return;
+ return false;
}
SaveToxProfile(m_tox);
}
+
+ return true;
}
void CToxProto::OnFriendRequest(Tox*, const uint8_t *pubKey, const uint8_t *message, size_t /* length */, void *arg)
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index 5277caa0ba..4109c00ecb 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -67,7 +67,7 @@ public:
int UserIsTyping(MCONTACT hContact, int type) override;
void OnBuildProtoMenu(void) override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnErase() override;
void OnModulesLoaded() override;
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index 09c8768582..3e019866ec 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -154,10 +154,10 @@ HANDLE CTwitterProto::GetAwayMsg(MCONTACT hContact)
return (HANDLE)1;
}
-void CTwitterProto::OnContactDeleted(MCONTACT hContact)
+bool CTwitterProto::OnContactDeleted(MCONTACT hContact)
{
if (m_iStatus != ID_STATUS_ONLINE)
- return;
+ return false;
ptrA szId(getStringA(hContact, TWITTER_KEY_UN));
if (szId) {
@@ -167,6 +167,7 @@ void CTwitterProto::OnContactDeleted(MCONTACT hContact)
mir_cslock s(twitter_lock_);
remove_friend(szId.get()); // Be careful about this until Miranda is fixed
}
+ return true;
}
void CTwitterProto::OnMarkRead(MCONTACT hContact, MEVENT hDbEvent)
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h
index d75753d0b2..e3e5650b4d 100644
--- a/protocols/Twitter/src/proto.h
+++ b/protocols/Twitter/src/proto.h
@@ -183,7 +183,7 @@ public:
HANDLE GetAwayMsg(MCONTACT) override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 924062555f..ca6df00340 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -745,17 +745,17 @@ int CVkProto::GetInfo(MCONTACT hContact, int)
return 0;
}
-void CVkProto::OnContactDeleted(MCONTACT hContact)
+bool CVkProto::OnContactDeleted(MCONTACT hContact)
{
ptrW pwszNick(db_get_wsa(hContact, m_szModuleName, "Nick"));
debugLogW(L"CVkProto::OnContactDeleted %s", pwszNick.get());
if (!Contact::OnList(hContact) || getBool(hContact, "SilentDelete") || isChatRoom((MCONTACT)hContact))
- return;
+ return true;
VKUserID_t iUserId = ReadVKUserID(hContact);
if (iUserId == VK_INVALID_USER || iUserId == VK_FEED_USER)
- return;
+ return true;
CONTACTDELETE_FORM_PARAMS *param = new CONTACTDELETE_FORM_PARAMS(pwszNick, true, !getBool(hContact, "Auth", true), true);
CVkContactDeleteForm dlg(this, param);
@@ -763,7 +763,7 @@ void CVkProto::OnContactDeleted(MCONTACT hContact)
debugLogW(L"CVkProto::OnContactDeleted %s DeleteDialog=%d DeleteFromFriendlist=%d", pwszNick.get(), param->bDeleteDialog, param->bDeleteFromFriendlist);
if (!(param->bDeleteDialog || param->bDeleteFromFriendlist))
- return;
+ return true;
CMStringA code(FORMAT, "var userID=\"%d\";", iUserId);
@@ -777,4 +777,5 @@ void CVkProto::OnContactDeleted(MCONTACT hContact)
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveSmth)
<< CHAR_PARAM("code", code.c_str()));
+ return true;
} \ No newline at end of file
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index ca061083c6..bc07b1dbc2 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -73,7 +73,7 @@ struct CVkProto : public PROTO<CVkProto>
int UserIsTyping(MCONTACT hContact, int type) override;
void OnBuildProtoMenu() override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index c93fc79d87..a37fbe8acb 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -496,7 +496,7 @@ Proto_GetStatus @601
?OnModulesLoaded@PROTO_INTERFACE@@UAEXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UAEXXZ @608 NONAME
?GetStatus@Contact@@YGHI@Z @609 NONAME
-?OnContactDeleted@PROTO_INTERFACE@@UAEXI@Z @610 NONAME
+?OnContactDeleted@PROTO_INTERFACE@@UAE_NI@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UAEXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UAEXXZ @612 NONAME
?getMStringA@CMPluginBase@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD0@Z @613 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 0284e7cbcd..374e1a3e7c 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -496,7 +496,7 @@ Proto_GetStatus @601
?OnModulesLoaded@PROTO_INTERFACE@@UEAAXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UEAAXXZ @608 NONAME
?GetStatus@Contact@@YAHI@Z @609 NONAME
-?OnContactDeleted@PROTO_INTERFACE@@UEAAXI@Z @610 NONAME
+?OnContactDeleted@PROTO_INTERFACE@@UEAA_NI@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UEAAXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UEAAXXZ @612 NONAME
?getMStringA@CMPluginBase@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD0@Z @613 NONAME
diff --git a/src/mir_app/src/proto_interface.cpp b/src/mir_app/src/proto_interface.cpp
index 00d7fb2f26..3caf9971aa 100644
--- a/src/mir_app/src/proto_interface.cpp
+++ b/src/mir_app/src/proto_interface.cpp
@@ -72,8 +72,10 @@ void PROTO_INTERFACE::OnBuildProtoMenu()
void PROTO_INTERFACE::OnContactAdded(MCONTACT)
{}
-void PROTO_INTERFACE::OnContactDeleted(MCONTACT)
-{}
+bool PROTO_INTERFACE::OnContactDeleted(MCONTACT)
+{
+ return true;
+}
MWindow PROTO_INTERFACE::OnCreateAccMgrUI(MWindow)
{
diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp
index 0dec7c5ee6..4765a79ad4 100644
--- a/src/mir_core/src/db.cpp
+++ b/src/mir_core/src/db.cpp
@@ -111,7 +111,8 @@ MIR_CORE_DLL(int) db_delete_contact(MCONTACT hContact, bool bFromProto)
if (!bFromProto)
if (auto *ppro = Proto_GetInstance(hContact))
- ppro->OnContactDeleted(hContact);
+ if (!ppro->OnContactDeleted(hContact))
+ return 1;
Netlib_Logf(nullptr, "Contact deleted: %d", hContact);
return (g_pCurrDb) ? g_pCurrDb->DeleteContact(hContact) : 0;