Fixed the client badges

This commit is contained in:
WolverinDEV 2021-04-23 11:16:27 +02:00
parent 356687b0be
commit 6631cd26c5

View File

@ -643,12 +643,12 @@ command_result ConnectedClient::handleCommandClientEdit(Command &cmd, const std:
if (index < str.length()) badgesTags++;
index++;
} while (index < str.length() && index != 0);
if (badgesTags >= 2) {
if (!permission::v2::permission_granted(1, this->calculate_permission(permission::b_client_allow_invalid_badges, client->getClientId())))
if (badgesTags >= 3) {
if (!permission::v2::permission_granted(1, this->calculate_permission(permission::b_client_allow_invalid_badges, client->getClientId()))) {
((VoiceClient *) this)->disconnect(VREASON_SERVER_KICK, config::messages::kick_invalid_badges, this->server ? this->server->serverAdmin : dynamic_pointer_cast<ConnectedClient>(serverInstance->getInitialServerAdmin()), true);
return command_result{error::parameter_invalid, "Invalid badges"};
}
}
//FIXME stuff here
continue;
} else if(!self && key == "client_version") {
if(client->getType() != ClientType::CLIENT_MUSIC) return command_result{error::client_invalid_type};
if(client->properties()[property::CLIENT_OWNER] != this->getClientDatabaseId()) {