Some updated

This commit is contained in:
WolverinDEV 2020-02-15 22:03:08 +01:00
parent 64b4a7118b
commit 371ca06bfa
4 changed files with 7 additions and 9 deletions

@ -1 +1 @@
Subproject commit a6e1c3cf1c97dd45405b08ad05578ea3d5d89e4a
Subproject commit c1e7b0c8f22a2eb24352e9dd25962d9c7bcdad30

View File

@ -711,8 +711,8 @@ std::vector<std::shared_ptr<GroupAssignment>> GroupManager::getAssignedServerGro
sql::result res;
std::vector<std::shared_ptr<GroupAssignment>> result;
if(this->root) {
auto root = this->root->getAssignedServerGroups(cldbid);
result.insert(result.begin(), root.begin(), root.end());
auto client_groups = this->root->getAssignedServerGroups(cldbid);
result.insert(result.begin(), client_groups.begin(), client_groups.end());
}
if(cached) {
@ -726,7 +726,7 @@ std::vector<std::shared_ptr<GroupAssignment>> GroupManager::getAssignedServerGro
shared_ptr<Group> group = nullptr;
time_point<system_clock> until;
for(int index = 0; index < length; index++){
for(int index = 0; index < length; index++) {
if(value[index] == nullptr) {
logError(this->getServerId(), string() + "Invalid value at " + column[index]);
continue;

View File

@ -903,7 +903,7 @@ std::vector<std::pair<permission::PermissionType, permission::v2::PermissionFlag
for(const auto& permission : permissions) {
permission::v2::PermissionFlaggedValue value{0, false};
for(const auto &gr : this->getGroupManager()->getServerGroups(cldbid, type)){
for(const auto &gr : server_groups){
auto group_permissions = gr->group->permissions();
auto flagged_permissions = granted ? group_permissions->permission_granted_flagged(permission) : group_permissions->permission_value_flagged(permission);
if(flagged_permissions.has_value)

View File

@ -131,16 +131,14 @@ namespace ts {
bool notifyClientEnterView(const std::deque<std::shared_ptr<ConnectedClient>> &deque, const ViewReasonSystemT &t) override;
bool
notifyClientMoved(const std::shared_ptr<ConnectedClient> &client, const std::shared_ptr<BasicChannel> &target_channel, ViewReasonId reason, std::string msg, std::shared_ptr<ConnectedClient> invoker, bool lock_channel_tree) override;
bool notifyClientMoved(const std::shared_ptr<ConnectedClient> &client, const std::shared_ptr<BasicChannel> &target_channel, ViewReasonId reason, std::string msg, std::shared_ptr<ConnectedClient> invoker, bool lock_channel_tree) override;
bool notifyClientLeftView(const std::shared_ptr<ConnectedClient> &client, const std::shared_ptr<BasicChannel> &target_channel, ViewReasonId reasonId, const std::string &reasonMessage, std::shared_ptr<ConnectedClient> invoker,
bool lock_channel_tree) override;
bool notifyClientLeftView(const std::deque<std::shared_ptr<ConnectedClient>> &deque, const std::string &string, bool b, const ViewReasonServerLeftT &t) override;
bool
notifyClientLeftViewKicked(const std::shared_ptr<ConnectedClient> &client, const std::shared_ptr<BasicChannel> &target_channel, const std::string &message, std::shared_ptr<ConnectedClient> invoker, bool lock_channel_tree) override;
bool notifyClientLeftViewKicked(const std::shared_ptr<ConnectedClient> &client, const std::shared_ptr<BasicChannel> &target_channel, const std::string &message, std::shared_ptr<ConnectedClient> invoker, bool lock_channel_tree) override;
bool notifyClientLeftViewBanned(const std::shared_ptr<ConnectedClient> &client, const std::string &message, std::shared_ptr<ConnectedClient> invoker, size_t length, bool lock_channel_tree) override;