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.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 342b86e696..485c049c33 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -1,12 +1,10 @@
#include "common.h"
CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
-PROTO<CToxProto>(protoName, userName)
+ PROTO<CToxProto>(protoName, userName)
{
accountName = mir_tstrdup(userName);
- InitToxCore();
-
CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit);
SetAllContactsStatus(ID_STATUS_OFFLINE);
@@ -49,8 +47,6 @@ PROTO<CToxProto>(protoName, userName)
CToxProto::~CToxProto()
{
- UninitToxCore();
-
mir_free(accountName);
}
@@ -236,11 +232,14 @@ int __cdecl CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM
case EV_PROTO_ONLOAD:
return OnAccountLoaded(wParam, lParam);
- case EV_PROTO_ONCONTACTDELETED:
- return OnContactDeleted(wParam, lParam);
+ case EV_PROTO_ONRENAME:
+ return OnAccountRenamed(wParam, lParam);
case EV_PROTO_ONEXIT:
- return OnPreShutdown(wParam, lParam);
+ return OnAccountUnloaded(wParam, lParam);
+
+ case EV_PROTO_ONCONTACTDELETED:
+ return OnContactDeleted(wParam, lParam);
}
return 1;