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/Omegle | |
parent | f365c11384642f6674ff5019ff97eda6f89ba378 (diff) |
group chat initialization to be done in protocol's constructor, not inside OnModulesLoaded
Diffstat (limited to 'protocols/Omegle')
-rw-r--r-- | protocols/Omegle/src/proto.cpp | 19 | ||||
-rw-r--r-- | protocols/Omegle/src/proto.h | 1 |
2 files changed, 8 insertions, 12 deletions
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 1ea0e17332..eee9e19127 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -61,6 +61,14 @@ OmegleProto::OmegleProto(const char* proto_name, const wchar_t* username) : g_plugin.addSound("StrangerTypStop", m_tszUserName, LPGENW("Stranger stopped typing"));
g_plugin.addSound("StrangerChange", m_tszUserName, LPGENW("Changing stranger"));
g_plugin.addSound("StrangerMessage", m_tszUserName, LPGENW("Receive message"));
+
+ // Register group chat
+ GCREGISTER gcr = {};
+ gcr.dwFlags = 0; //GC_TYPNOTIF; //GC_ACKMSG;
+ gcr.pszModule = m_szModuleName;
+ gcr.ptszDispName = m_tszUserName;
+ gcr.iMaxText = OMEGLE_MESSAGE_LIMIT;
+ Chat_Register(&gcr);
}
OmegleProto::~OmegleProto()
@@ -136,17 +144,6 @@ INT_PTR OmegleProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) (HWND)lParam, OmegleAccountProc, (LPARAM)this);
}
-void OmegleProto::OnModulesLoaded()
-{
- // Register group chat
- GCREGISTER gcr = {};
- gcr.dwFlags = 0; //GC_TYPNOTIF; //GC_ACKMSG;
- gcr.pszModule = m_szModuleName;
- gcr.ptszDispName = m_tszUserName;
- gcr.iMaxText = OMEGLE_MESSAGE_LIMIT;
- Chat_Register(&gcr);
-}
-
void OmegleProto::OnShutdown()
{
SetStatus(ID_STATUS_OFFLINE);
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h index b84d023247..fe84b61698 100644 --- a/protocols/Omegle/src/proto.h +++ b/protocols/Omegle/src/proto.h @@ -52,7 +52,6 @@ public: int UserIsTyping(MCONTACT hContact, int type) override;
void OnContactDeleted(MCONTACT) override;
- void OnModulesLoaded() override;
void OnShutdown() override;
// Services
|