diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-10 12:01:55 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-10 12:01:55 +0000 |
commit | 78f97fe198286a120370f6c56921205191f986b0 (patch) | |
tree | 96629174df34f22697c5eaad7cfe102f8f7fd5eb /protocols/Tox/src/tox_events.cpp | |
parent | bff791f9bd1828c66e1462a4a3f86a800b58ad13 (diff) |
Tox:
- switched to new api
- updated tox core
git-svn-id: http://svn.miranda-ng.org/main/trunk@12726 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_events.cpp')
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index fb1ce6ba43..406999549a 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -11,18 +11,20 @@ int CToxProto::OnContactDeleted(MCONTACT hContact, LPARAM) {
if (!IsOnline())
{
- return 1;
+ return -1;
}
if (!isChatRoom(hContact))
{
int32_t friendNumber = GetToxFriendNumber(hContact);
- if (friendNumber == TOX_ERROR || tox_del_friend(tox, friendNumber) == TOX_ERROR)
+ TOX_ERR_FRIEND_DELETE error;
+ if (!tox_friend_delete(tox, friendNumber, &error))
{
- return 1;
+ debugLogA(__FUNCTION__": failed to delete friend (%d)", error);
+ return error;
}
}
- else
+ /*else
{
OnLeaveChatRoom(hContact, 0);
int groupNumber = 0; // ???
@@ -30,7 +32,7 @@ int CToxProto::OnContactDeleted(MCONTACT hContact, LPARAM) {
return 1;
}
- }
+ }*/
return 0;
}
\ No newline at end of file |