summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r--protocols/Tox/src/tox_proto.cpp7
1 files changed, 4 insertions, 3 deletions
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);
}