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/MinecraftDynmap/src | |
parent | f365c11384642f6674ff5019ff97eda6f89ba378 (diff) |
group chat initialization to be done in protocol's constructor, not inside OnModulesLoaded
Diffstat (limited to 'protocols/MinecraftDynmap/src')
-rw-r--r-- | protocols/MinecraftDynmap/src/proto.cpp | 17 | ||||
-rw-r--r-- | protocols/MinecraftDynmap/src/proto.h | 1 |
2 files changed, 7 insertions, 11 deletions
diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp index f685b3c98d..ee936a7b46 100644 --- a/protocols/MinecraftDynmap/src/proto.cpp +++ b/protocols/MinecraftDynmap/src/proto.cpp @@ -55,6 +55,13 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const wchar_t MessageBox(nullptr, error, L"Miranda NG", MB_OK | MB_ICONERROR); } + // Register group chat + GCREGISTER gcr = {}; + gcr.pszModule = m_szModuleName; + gcr.ptszDispName = m_tszUserName; + gcr.iMaxText = MINECRAFTDYNMAP_MESSAGE_LIMIT; + Chat_Register(&gcr); + // Client instantiation this->error_count_ = 0; this->chatHandle_ = nullptr; @@ -135,16 +142,6 @@ INT_PTR MinecraftDynmapProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) return (INT_PTR)CreateDialogParam(g_plugin.getInst(),MAKEINTRESOURCE(IDD_MinecraftDynmapACCOUNT), (HWND)lParam, MinecraftDynmapAccountProc, (LPARAM)this); } -void MinecraftDynmapProto::OnModulesLoaded() -{ - // Register group chat - GCREGISTER gcr = {}; - gcr.pszModule = m_szModuleName; - gcr.ptszDispName = m_tszUserName; - gcr.iMaxText = MINECRAFTDYNMAP_MESSAGE_LIMIT; - Chat_Register(&gcr); -} - void MinecraftDynmapProto::OnShutdown() { SetStatus(ID_STATUS_OFFLINE); diff --git a/protocols/MinecraftDynmap/src/proto.h b/protocols/MinecraftDynmap/src/proto.h index 9243205886..30bd052680 100644 --- a/protocols/MinecraftDynmap/src/proto.h +++ b/protocols/MinecraftDynmap/src/proto.h @@ -47,7 +47,6 @@ public: int SetStatus(int iNewStatus) override; void OnContactDeleted(MCONTACT) override; - void OnModulesLoaded() override; void OnShutdown() override; // Services |