Refactor: feedback from code review

Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
This commit is contained in:
Lucca Jiménez Könings
2024-05-21 13:38:37 +02:00
parent 67db9358e1
commit 84f5f95e54
10 changed files with 330 additions and 369 deletions
+3 -3
View File
@@ -385,7 +385,7 @@ void TConsole::Command_Settings(const std::string&, const std::vector<std::strin
settings set <categoty> <setting> <value> sets specified setting to value
)";
if (args.size() == 0) {
if (EnsureArgsCount(args, 0)) {
beammp_errorf("No arguments specified for command 'settings'!");
Application::Console().WriteRaw("BeamMP-Server Console: " + std::string(sHelpString));
return;
@@ -472,11 +472,11 @@ void TConsole::Command_Settings(const std::string&, const std::vector<std::strin
} else if (args.front() == "list") {
// std::unordered_map<std::string, Settings::SettingsAccessControl>
for (const auto& [composedKey, keyACL] : Application::Settings.getACLMap()) {
for (const auto& [composedKey, keyACL] : Application::Settings.getAccessControlMap()) {
// even though we have the value, we want to ignore it in order to make use of access
// control checks
if (keyACL.second != Settings::SettingsAccessMask::noaccess) {
if (keyACL.second != Settings::SettingsAccessMask::NO_ACCESS) {
try {