summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-23 13:30:42 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-23 13:30:42 +0300
commit7ec9441d255b4361be26705c65eed5819cd0208f (patch)
treea9dcfa765475648a6c5d7dfaf92b901f916b7c21 /protocols/Tox/src
parent93249b0dec5639fa1c438da3e3289b65bf04c1de (diff)
Clist_GroupCreate() to be called inside OnModulesLoaded, not inside the protocol's constructor
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/tox_accounts.cpp2
-rw-r--r--protocols/Tox/src/tox_proto.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp
index ad948974a8..d70d6bad54 100644
--- a/protocols/Tox/src/tox_accounts.cpp
+++ b/protocols/Tox/src/tox_accounts.cpp
@@ -32,6 +32,8 @@ CToxProto* CToxProto::GetContactAccount(MCONTACT hContact)
int CToxProto::OnAccountLoaded(WPARAM, LPARAM)
{
+ Clist_GroupCreate(0, m_defaultGroup);
+
HookProtoEvent(ME_OPT_INITIALISE, &CToxProto::OnOptionsInit);
HookProtoEvent(ME_USERINFO_INITIALISE, &CToxProto::OnUserInfoInit);
HookProtoEvent(ME_MSG_PRECREATEEVENT, &CToxProto::OnPreCreateMessage);
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 4b0a8581a2..0de30278a4 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -12,8 +12,7 @@ CToxProto::CToxProto(const char* protoName, const wchar_t* userName)
m_defaultGroup = getWStringA(TOX_SETTINGS_GROUP);
if (m_defaultGroup == nullptr)
m_defaultGroup = mir_wstrdup(L"Tox");
- Clist_GroupCreate(0, m_defaultGroup);
-
+
CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit);
setAllContactStatuses(ID_STATUS_OFFLINE);