diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-13 23:05:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-13 23:05:46 +0300 |
commit | a727a5f4cb61f721cef5a6afa6c2054a06659fea (patch) | |
tree | 3f9bf1677486c0cdbe38ccfba3de72b0f4030d1e /protocols/Discord/src/proto.cpp | |
parent | 653fe9968498470fddda828959c26b886efecbac (diff) |
Discord: displaying roles correctly
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 |