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/proto.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols/Discord/src/proto.cpp') diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index e102d86fb1..ed5d9fe3e7 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -27,6 +27,11 @@ static int compareRequests(const AsyncHttpRequest *p1, const AsyncHttpRequest *p return p1->m_iReqNum - p2->m_iReqNum; } +static int compareRoles(const CDiscordRole *p1, const CDiscordRole *p2) +{ + return p1->id - p2->id; +} + static int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2) { return p1->id - p2->id; @@ -40,6 +45,7 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : m_wszEmail(this, DB_KEY_EMAIL, L""), arMarkReadQueue(1, compareUsers), arOwnMessages(1, compareMessages), + arRoles(10, compareRoles), arUsers(50, compareUsers) { // Services -- cgit v1.2.3