diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-20 00:12:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-20 00:12:11 +0300 |
commit | fa78a351b86311df1e19cd5d0e835156a65d1fab (patch) | |
tree | dd38f650c4f6a9cdb545624262d8ea1876567c74 /protocols/Discord/src/proto.cpp | |
parent | 92b173c3a8553b59077aa2757c9627cb4c73d29e (diff) |
Discord: first version with groupchats
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 83cc7c1941..946a356441 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -425,8 +425,20 @@ int CDiscordProto::OnDeleteContact(MCONTACT hContact) ///////////////////////////////////////////////////////////////////////////////////////// +static COLORREF crCols[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + int CDiscordProto::OnModulesLoaded(WPARAM, LPARAM) { + GCREGISTER gcr = {}; + gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR; + gcr.nColors = _countof(crCols); + gcr.pColors = &crCols[0]; + gcr.ptszDispName = m_tszUserName; + gcr.pszModule = m_szModuleName; + Chat_Register(&gcr); + + HookProtoEvent(ME_GC_EVENT, &CDiscordProto::GroupchatEventHook); + HookProtoEvent(ME_GC_BUILDMENU, &CDiscordProto::GroupchatMenuHook); return 0; } |