diff options
author | George Hazan <ghazan@miranda.im> | 2020-07-08 18:39:15 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-07-08 18:39:15 +0300 |
commit | 5b9180012f495e23dfdd9fb7d91cfb1258734fe3 (patch) | |
tree | b80652f253cefb1b807d9aac04ad8e9a4676518e /protocols/Discord | |
parent | f365c11384642f6674ff5019ff97eda6f89ba378 (diff) |
group chat initialization to be done in protocol's constructor, not inside OnModulesLoaded
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 3eb222f68e..b346de4d88 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -92,6 +92,13 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_ENDED); DbEvent_RegisterType(&dbEventType); + // Groupchat initialization + GCREGISTER gcr = {}; + gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR; + gcr.ptszDispName = m_tszUserName; + gcr.pszModule = m_szModuleName; + Chat_Register(&gcr); + // Network initialization CMStringW descr; NETLIBUSER nlu = {}; @@ -145,12 +152,6 @@ void CDiscordProto::OnModulesLoaded() else pNew->channelId = getId(hContact, DB_KEY_CHANNELID); } - GCREGISTER gcr = {}; - gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR; - gcr.ptszDispName = m_tszUserName; - gcr.pszModule = m_szModuleName; - Chat_Register(&gcr); - // Clist Clist_GroupCreate(0, m_wszDefaultGroup); |