formatting

This commit is contained in:
Jake Probst
2023-06-11 12:56:40 -06:00
committed by Martin Michelsen
parent 148d327d9f
commit 9f78790e14
2 changed files with 7 additions and 9 deletions
+1 -2
View File
@@ -1128,8 +1128,7 @@ static void server_command_drop(shared_ptr<ServerState>, shared_ptr<Lobby> l,
check_is_game(l, true); check_is_game(l, true);
check_is_leader(l, c); check_is_leader(l, c);
l->flags ^= Lobby::Flag::DROPS_ENABLED; l->flags ^= Lobby::Flag::DROPS_ENABLED;
send_text_message_printf(l, "Drops %s", send_text_message_printf(l, "Drops %s", (l->flags & Lobby::Flag::DROPS_ENABLED) ? "enabled" : "disabled");
(l->flags & Lobby::Flag::DROPS_ENABLED) ? "enabled" : "disabled");
} }
static void server_command_item(shared_ptr<ServerState>, shared_ptr<Lobby> l, static void server_command_item(shared_ptr<ServerState>, shared_ptr<Lobby> l,
+1 -2
View File
@@ -652,8 +652,7 @@ void ServerState::parse_config(shared_ptr<const JSONObject> config_json) {
try { try {
this->drops_enabled = d.at("EnableDrops")->as_bool(); this->drops_enabled = d.at("EnableDrops")->as_bool();
} } catch (const out_of_range&) {
catch (const out_of_range&) {
this->drops_enabled = true; this->drops_enabled = true;
} }