formatting
This commit is contained in:
committed by
Martin Michelsen
parent
148d327d9f
commit
9f78790e14
+4
-5
@@ -1125,11 +1125,10 @@ static void proxy_command_switch_assist(shared_ptr<ServerState>,
|
||||
|
||||
static void server_command_drop(shared_ptr<ServerState>, shared_ptr<Lobby> l,
|
||||
shared_ptr<Client> c, const std::u16string&) {
|
||||
check_is_game(l, true);
|
||||
check_is_leader(l, c);
|
||||
l->flags ^= Lobby::Flag::DROPS_ENABLED;
|
||||
send_text_message_printf(l, "Drops %s",
|
||||
(l->flags & Lobby::Flag::DROPS_ENABLED) ? "enabled" : "disabled");
|
||||
check_is_game(l, true);
|
||||
check_is_leader(l, c);
|
||||
l->flags ^= Lobby::Flag::DROPS_ENABLED;
|
||||
send_text_message_printf(l, "Drops %s", (l->flags & Lobby::Flag::DROPS_ENABLED) ? "enabled" : "disabled");
|
||||
}
|
||||
|
||||
static void server_command_item(shared_ptr<ServerState>, shared_ptr<Lobby> l,
|
||||
|
||||
+3
-4
@@ -651,10 +651,9 @@ void ServerState::parse_config(shared_ptr<const JSONObject> config_json) {
|
||||
}
|
||||
|
||||
try {
|
||||
this->drops_enabled = d.at("EnableDrops")->as_bool();
|
||||
}
|
||||
catch (const out_of_range&) {
|
||||
this->drops_enabled = true;
|
||||
this->drops_enabled = d.at("EnableDrops")->as_bool();
|
||||
} catch (const out_of_range&) {
|
||||
this->drops_enabled = true;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user