From 2e2390295cbf3f8f24a938bf957d3ecd5b86d3a6 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 12 Aug 2014 19:54:22 +0000 Subject: Tox: contact deletion git-svn-id: http://svn.miranda-ng.org/main/trunk@10172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_contacts.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'protocols/Tox/src/tox_contacts.cpp') diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 1fd99bc36e..3ae3cf9f21 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -96,6 +96,16 @@ void CToxProto::LoadContactList() std::string toxId = DataToHexString(clientId); MCONTACT hContact = AddContact(toxId.c_str()); + if (hContact) + { + tox_get_name(tox, friends[i], &username[0]); + std::string nick(username.begin(), username.end()); + setString(hContact, "Nick", nick.c_str()); + + uint8_t userstatus = tox_get_user_status(tox, friends[i]); + int status = ToxToMirandaStatus((TOX_USERSTATUS)userstatus); + SetContactStatus(hContact, status); + } } } } -- cgit v1.2.3