diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-10 16:10:24 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-10 16:10:24 +0000 |
commit | 40ca3f169e61d1273d47ddcee277bbc5bcb6ffdf (patch) | |
tree | b9065bc63cd527321ff41b91f1ca457716b63384 /protocols/Tox/src/tox_account.cpp | |
parent | b3a63d4e727b8552f8cf2b321cc68d2631ef3179 (diff) |
Tox: first approach to saving and restoring data
git-svn-id: http://svn.miranda-ng.org/main/trunk@10145 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r-- | protocols/Tox/src/tox_account.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index 9c59965bc7..c63328f6ac 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -45,9 +45,22 @@ void CToxProto::ConnectionThread(void*) {
DoBootstrap();
+ uint8_t name[TOX_MAX_NAME_LENGTH + 1];
+ uint16_t namelen = tox_get_self_name(tox, name);
+ name[namelen] = 0;
+
if (tox_isconnected(tox))
{
isConnected = true;
+
+ char dataPath[MAX_PATH];
+ mir_snprintf(dataPath, MAX_PATH, "%s\\%s.tox", VARS("%miranda_profile%\\%miranda_profilename%"), m_tszUserName);
+
+ SaveToxData(dataPath);
+
+ char idstring3[200] = { 0 };
+ get_id(tox, idstring3);
+
break;
}
|