From a93391bc7442c024d5e795e207b8422883e7bfdf Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 18 Aug 2014 21:02:24 +0000 Subject: Tox: - save our id in database - first approach of user info support git-svn-id: http://svn.miranda-ng.org/main/trunk@10233 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_account.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols/Tox/src/tox_account.cpp') diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index 6ca734d0e4..40ded847e6 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -41,6 +41,11 @@ void CToxProto::InitToxCore() tox_get_self_name(tox, &username[0]); std::string nick(username.begin(), username.end()); setWString("Nick", ptrW(Utf8DecodeW(nick.c_str()))); + + std::vector address(TOX_FRIEND_ADDRESS_SIZE); + tox_get_address(tox, &address[0]); + std::string toxId = DataToHexString(address); + setString(TOX_SETTINGS_ID, toxId.c_str()); } void CToxProto::UninitToxCore() -- cgit v1.2.3