diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-23 18:49:59 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-23 18:49:59 +0000 |
commit | df1139ff3c50f0cffc7dc7a8a4e7310eb7e55e2d (patch) | |
tree | aa69f41aad4783a8411517226f2eee8aa9d52804 /protocols/Tox/src/tox_utils.cpp | |
parent | b1f4580508e05eee171b6476e90f345414bc8d04 (diff) |
Tox:
- fixed own status changing
- refactored contacts adding
git-svn-id: http://svn.miranda-ng.org/main/trunk@10315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 6745bedb71..5964177965 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -125,6 +125,15 @@ std::string CToxProto::DataToHexString(std::vector<uint8_t> data) return oss.str();
}
+std::string CToxProto::ToxAddressToId(std::string address)
+{
+ if (address.length() > TOX_CLIENT_ID_SIZE * 2)
+ {
+ address.erase(address.begin() + TOX_CLIENT_ID_SIZE * 2, address.end());
+ }
+ return address;
+}
+
bool CToxProto::IsFileExists(std::tstring path)
{
//return ::GetFileAttributes(fileName) != DWORD(-1)
|