Updates for 1.4.1

This commit is contained in:
WolverinDEV
2019-10-29 16:06:34 +01:00
parent 0b2ec5ac0a
commit fc365736ed
12 changed files with 30 additions and 22 deletions
+3 -3
View File
@@ -440,7 +440,7 @@ int64_t GroupManager::generateGroupId(sql::SqlManager* sql) {
return hightestGroupId + 1;
}
std::deque<property::ClientProperties> GroupManager::update_server_group_property(const shared_ptr<server::ConnectedClient> &client, bool channel_lock) {
std::deque<property::ClientProperties> GroupManager::update_server_group_property(const shared_ptr<server::ConnectedClient> &client, bool channel_lock, const std::shared_ptr<BasicChannel>& channel) {
std::deque<property::ClientProperties> changed;
//Server groups
@@ -467,8 +467,8 @@ std::deque<property::ClientProperties> GroupManager::update_server_group_propert
}
//Channel groups
if(client->getChannel()){
shared_ptr<GroupAssignment> group = this->getChannelGroup(client->getClientDatabaseId(), client->getChannel(), true);
if(channel){
shared_ptr<GroupAssignment> group = this->getChannelGroup(client->getClientDatabaseId(), channel, true);
if(client->properties()[property::CLIENT_CHANNEL_GROUP_INHERITED_CHANNEL_ID] != group->channelId) {
client->properties()[property::CLIENT_CHANNEL_GROUP_INHERITED_CHANNEL_ID] = group->channelId;
changed.push_back(property::CLIENT_CHANNEL_GROUP_INHERITED_CHANNEL_ID);