diff options
author | George Hazan <ghazan@miranda.im> | 2019-06-27 21:23:35 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-06-27 21:23:35 +0300 |
commit | 44525f461757fc859616fda16820351b07238842 (patch) | |
tree | 117ad05514eed381fc13dcf8befcf0ff06023e57 /protocols/Discord | |
parent | 810ed4dea67b54a18f6ec3f5273d2f8efe08708c (diff) |
manual access to CList/Group restricted
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/guilds.cpp | 4 | ||||
-rw-r--r-- | protocols/Discord/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Discord/src/utils.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp index 7b48b87e90..b2d6e85b11 100644 --- a/protocols/Discord/src/guilds.cpp +++ b/protocols/Discord/src/guilds.cpp @@ -75,14 +75,14 @@ void CDiscordProto::ProcessRole(CDiscordGuild *guild, const JSONNode &role) static void sttSetGroupName(MCONTACT hContact, const wchar_t *pwszGroupName) { - ptrW wszOldName(db_get_wsa(hContact, "CList", "Group")); + ptrW wszOldName(Clist_GetGroup(hContact)); if (wszOldName != nullptr) { ptrW wszChatGroup(Chat_GetGroup()); if (mir_wstrcmpi(wszOldName, wszChatGroup)) return; // custom group, don't touch it } - db_set_ws(hContact, "CList", "Group", pwszGroupName); + Clist_SetGroup(hContact, pwszGroupName); } void CDiscordProto::BatchChatCreate(void *param) diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 0526883730..b3388a3268 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -355,7 +355,7 @@ MCONTACT CDiscordProto::AddToList(int flags, PROTOSEARCHRESULT *psr) setId(hContact, DB_KEY_ID, pUser->id); } - db_set_ws(hContact, "CList", "Group", m_wszDefaultGroup); + Clist_SetGroup(hContact, m_wszDefaultGroup); setWString(hContact, DB_KEY_NICK, pUser->wszUsername); setDword(hContact, DB_KEY_DISCR, pUser->iDiscriminator); arUsers.insert(pUser); diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index 8735b2bffe..95a7b098c3 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -165,7 +165,7 @@ CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) MCONTACT hContact = db_add_contact(); Proto_AddToContact(hContact, m_szModuleName); - db_set_ws(hContact, "CList", "Group", m_wszDefaultGroup); + Clist_SetGroup(hContact, m_wszDefaultGroup); setId(hContact, DB_KEY_ID, id); setWString(hContact, DB_KEY_NICK, username); setDword(hContact, DB_KEY_DISCR, iDiscriminator); |