diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-01-07 21:40:06 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-01-07 21:40:06 +0000 |
commit | 4cf5a9ef45a6f6172e93c1f84bcbab22be00e0a4 (patch) | |
tree | 320b0e8f323ac90bb22e9a792bf5ecc25d7a1cf6 /protocols/Tox/src/tox_proto.cpp | |
parent | 6c61dc812b9a5382c282f3e61111516fff562c0e (diff) |
Tox: enabled profile encryption
git-svn-id: http://svn.miranda-ng.org/main/trunk@11790 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 89be71ab18..204777d9ec 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -1,9 +1,10 @@ #include "common.h"
CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
- PROTO<CToxProto>(protoName, userName)
+ PROTO<CToxProto>(protoName, userName), password(NULL)
{
InitNetlib();
+
accountName = mir_tstrdup(userName);
CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit);
@@ -112,7 +113,6 @@ int __cdecl CToxProto::Authorize(HANDLE hDbEvent) db_unset(hContact, "CList", "NotOnList");
delSetting(hContact, "Grant");
- SaveToxProfile();
return 0;
}
@@ -133,8 +133,6 @@ int __cdecl CToxProto::AuthRequest(MCONTACT hContact, const PROTOCHAR *szMessage int32_t number = tox_add_friend(tox, pubKey.data(), (uint8_t*)(char*)reason, (uint16_t)strlen(reason));
if (number > TOX_ERROR)
{
- SaveToxProfile();
-
// change tox address in contact id by tox id
std::string id = ToxAddressToId(address);
setString(hContact, TOX_SETTINGS_ID, id.c_str());
@@ -237,9 +235,9 @@ int __cdecl CToxProto::SetStatus(int iNewStatus) {
// set tox status
m_iStatus = iNewStatus;
- if (tox_set_user_status(tox, MirandaToToxStatus(iNewStatus)) == 0)
+ if (tox_set_user_status(tox, MirandaToToxStatus(iNewStatus)) == TOX_ERROR)
{
- SaveToxProfile();
+ debugLogA("CToxProto::SetStatus: failed to change status from %i", m_iStatus, iNewStatus);
}
}
}
|