summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_account.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-08-18 21:02:24 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-08-18 21:02:24 +0000
commita93391bc7442c024d5e795e207b8422883e7bfdf (patch)
tree62226bdafa41fd80ab7122fd8ed67fbb71a29ef5 /protocols/Tox/src/tox_account.cpp
parente39da35942db7d2bd7c192336f4d3c33e44d0ba4 (diff)
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
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r--protocols/Tox/src/tox_account.cpp5
1 files changed, 5 insertions, 0 deletions
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<uint8_t> 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()