diff options
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_account.cpp | 11 | ||||
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 2 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 7 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 1 |
4 files changed, 5 insertions, 16 deletions
diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index 0262ba774e..97c659909b 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -13,9 +13,6 @@ int CToxProto::OnAccountLoaded(WPARAM, LPARAM) HookProtoEvent(ME_DB_CONTACT_SETTINGCHANGED, &CToxProto::OnSettingsChanged);
HookProtoEvent(ME_MSG_PRECREATEEVENT, &CToxProto::OnPreCreateMessage);
- InitNetlib();
- InitToxCore();
-
return 0;
}
@@ -33,14 +30,6 @@ int CToxProto::OnAccountRenamed(WPARAM, LPARAM lParam) return 0;
}
-int CToxProto::OnAccountUnloaded(WPARAM, LPARAM)
-{
- UninitToxCore();
- UninitNetlib();
-
- return 0;
-}
-
void CToxProto::InitToxCore()
{
std::tstring profilePath = GetToxProfilePath();
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index d34ac4963a..5987557851 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -40,7 +40,7 @@ int CToxProto::OnSettingsChanged(WPARAM hContact, LPARAM lParam) {
if (tox_set_name(tox, (uint8_t*)dbcws->value.pszVal, (uint16_t)strlen(dbcws->value.pszVal)))
{
- SaveToxProfile();
+ //SaveToxProfile();
}
}
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 485c049c33..ea60618fac 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -3,6 +3,8 @@ CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
PROTO<CToxProto>(protoName, userName)
{
+ InitNetlib();
+ InitToxCore();
accountName = mir_tstrdup(userName);
CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit);
@@ -48,6 +50,8 @@ CToxProto::CToxProto(const char* protoName, const TCHAR* userName) : CToxProto::~CToxProto()
{
mir_free(accountName);
+ UninitToxCore();
+ UninitNetlib();
}
DWORD_PTR __cdecl CToxProto::GetCaps(int type, MCONTACT hContact)
@@ -235,9 +239,6 @@ int __cdecl CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM case EV_PROTO_ONRENAME:
return OnAccountRenamed(wParam, lParam);
- case EV_PROTO_ONEXIT:
- return OnAccountUnloaded(wParam, lParam);
-
case EV_PROTO_ONCONTACTDELETED:
return OnContactDeleted(wParam, lParam);
}
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 405da468b5..c69ec385e6 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -145,7 +145,6 @@ private: bool IsOnline();
int __cdecl OnAccountLoaded(WPARAM, LPARAM);
int __cdecl OnAccountRenamed(WPARAM, LPARAM);
- int __cdecl OnAccountUnloaded(WPARAM, LPARAM);
// events
int __cdecl OnSettingsChanged(WPARAM wParam, LPARAM lParam);
|