From 7ec9441d255b4361be26705c65eed5819cd0208f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Mar 2018 13:30:42 +0300 Subject: Clist_GroupCreate() to be called inside OnModulesLoaded, not inside the protocol's constructor --- protocols/Discord/src/proto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/Discord') diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 5403f78955..6d899154dc 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -65,9 +65,6 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : // database db_set_resident(m_szModuleName, "XStatusMsg"); - // Clist - Clist_GroupCreate(0, m_wszDefaultGroup); - // Fill users list for (auto &hContact : AccContacts()) { CDiscordUser *pNew = new CDiscordUser(getId(hContact, DB_KEY_ID)); @@ -579,6 +576,9 @@ int CDiscordProto::OnModulesLoaded(WPARAM, LPARAM) gcr.pszModule = m_szModuleName; Chat_Register(&gcr); + // Clist + Clist_GroupCreate(0, m_wszDefaultGroup); + HookProtoEvent(ME_GC_EVENT, &CDiscordProto::GroupchatEventHook); HookProtoEvent(ME_GC_BUILDMENU, &CDiscordProto::GroupchatMenuHook); -- cgit v1.2.3