From fa78a351b86311df1e19cd5d0e835156a65d1fab Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 20 Jan 2017 00:12:11 +0300 Subject: Discord: first version with groupchats --- protocols/Discord/src/proto.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'protocols/Discord/src/proto.cpp') 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; } -- cgit v1.2.3