From e166b028427169375fb5da938ada6f3f3db520d2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 22 Feb 2017 18:34:13 +0300 Subject: major rework of Discord: - CDiscordGuild - a class to utilize all guild-related activity; - all guild related code moved to the separate module; - fix for online guild channel creation; - version bump; --- protocols/Discord/src/groupchat.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'protocols/Discord/src/groupchat.cpp') diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp index 6641a4fd88..ac9cf235d5 100644 --- a/protocols/Discord/src/groupchat.cpp +++ b/protocols/Discord/src/groupchat.cpp @@ -25,15 +25,12 @@ enum { ///////////////////////////////////////////////////////////////////////////////////////// -void CDiscordProto::BuildStatusList(SnowFlake guildId, const CMStringW &wszChannelId) +void CDiscordProto::BuildStatusList(const CDiscordGuild *pGuild, 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); - } + for (int i = 0; i < pGuild->arRoles.getCount(); i++) + Chat_AddGroup(m_szModuleName, wszChannelId, pGuild->arRoles[i].wszName); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3