From df1139ff3c50f0cffc7dc7a8a4e7310eb7e55e2d Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 23 Aug 2014 18:49:59 +0000 Subject: Tox: - fixed own status changing - refactored contacts adding git-svn-id: http://svn.miranda-ng.org/main/trunk@10315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_utils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'protocols/Tox/src/tox_utils.cpp') 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 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) -- cgit v1.2.3