From a727a5f4cb61f721cef5a6afa6c2054a06659fea Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 Feb 2017 23:05:38 +0300 Subject: Discord: displaying roles correctly --- protocols/Discord/src/groupchat.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'protocols/Discord/src/groupchat.cpp') diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp index 5525f6658f..6641a4fd88 100644 --- a/protocols/Discord/src/groupchat.cpp +++ b/protocols/Discord/src/groupchat.cpp @@ -23,6 +23,21 @@ enum { IDM_CHANGENICK, IDM_CHANGETOPIC, IDM_INVITE }; +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::BuildStatusList(SnowFlake guildId, const CMStringW &wszChannelId) +{ + Chat_AddGroup(m_szModuleName, wszChannelId, L"@owner"); + + for (int i = 0; i < arRoles.getCount(); i++) { + CDiscordRole &r = arRoles[i]; + if (r.guildId == guildId) + Chat_AddGroup(m_szModuleName, wszChannelId, r.wszName); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + static gc_item sttLogListItems[] = { { LPGENW("Change &nickname"), IDM_CHANGENICK, MENU_ITEM }, -- cgit v1.2.3