summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-22 18:34:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-22 18:34:13 +0300
commite166b028427169375fb5da938ada6f3f3db520d2 (patch)
tree0e2de73477db8ed1300073004d6e255baf7bcfa5 /protocols/Discord/src/proto.cpp
parentb36289b6ed6dfdc74e42ac89a8d873cee058453d (diff)
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;
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r--protocols/Discord/src/proto.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 80331edbda..34d3ae8840 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -27,12 +27,12 @@ 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)
+int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2)
{
return p1->id - p2->id;
}
-static int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2)
+static int compareGuilds(const CDiscordGuild *p1, const CDiscordGuild *p2)
{
return p1->id - p2->id;
}
@@ -43,10 +43,10 @@ CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) :
m_evRequestsQueue(CreateEvent(NULL, FALSE, FALSE, NULL)),
m_wszDefaultGroup(this, DB_KEY_GROUP, DB_KEYVAL_GROUP),
m_wszEmail(this, DB_KEY_EMAIL, L""),
+ arGuilds(1, compareGuilds),
arMarkReadQueue(1, compareUsers),
arOwnMessages(1, compareMessages),
- arRoles(10, compareRoles),
- arUsers(50, compareUsers)
+ arUsers(10, compareUsers)
{
// Services
CreateProtoService(PS_GETSTATUS, &CDiscordProto::GetStatus);