remove custom login options from proxy options menu
This commit is contained in:
@@ -159,6 +159,11 @@ void populate_state_from_config(shared_ptr<ServerState> s,
|
||||
} catch (const out_of_range&) {
|
||||
s->proxy_allow_save_files = true;
|
||||
}
|
||||
try {
|
||||
s->proxy_enable_login_options = d.at("ProxyEnableLoginOptions")->as_bool();
|
||||
} catch (const out_of_range&) {
|
||||
s->proxy_enable_login_options = false;
|
||||
}
|
||||
|
||||
try {
|
||||
s->ep3_behavior_flags = d.at("Episode3BehaviorFlags")->as_int();
|
||||
|
||||
@@ -742,6 +742,7 @@ void ProxyServer::LinkedSession::send_to_game_server(const char* error_message)
|
||||
}
|
||||
|
||||
this->client_channel.send(0x19, 0x00, &reconnect_cmd, sizeof(reconnect_cmd));
|
||||
this->close_on_disconnect = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,10 +109,12 @@ static vector<MenuItem> proxy_options_menu_for_client(
|
||||
ret.emplace_back(ProxyOptionsMenuItemID::SAVE_FILES,
|
||||
c->options.save_files ? u"Save files ON" : u"Save files OFF", u"", 0);
|
||||
}
|
||||
ret.emplace_back(ProxyOptionsMenuItemID::SUPPRESS_LOGIN,
|
||||
c->options.suppress_remote_login ? u"Skip login ON" : u"Skip login OFF", u"", 0);
|
||||
ret.emplace_back(ProxyOptionsMenuItemID::SKIP_CARD,
|
||||
c->options.zero_remote_guild_card ? u"Skip card ON" : u"Skip card OFF", u"", 0);
|
||||
if (s->proxy_enable_login_options) {
|
||||
ret.emplace_back(ProxyOptionsMenuItemID::SUPPRESS_LOGIN,
|
||||
c->options.suppress_remote_login ? u"Skip login ON" : u"Skip login OFF", u"", 0);
|
||||
ret.emplace_back(ProxyOptionsMenuItemID::SKIP_CARD,
|
||||
c->options.zero_remote_guild_card ? u"Skip card ON" : u"Skip card OFF", u"", 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -137,7 +139,8 @@ static void send_client_to_proxy_server(shared_ptr<ServerState> s, shared_ptr<Cl
|
||||
c->license, local_port, c->version(), c->export_config_bb());
|
||||
session->options = c->options;
|
||||
session->options.save_files &= s->proxy_allow_save_files;
|
||||
if (session->options.zero_remote_guild_card) {
|
||||
session->options.suppress_remote_login &= s->proxy_enable_login_options;
|
||||
if (session->options.zero_remote_guild_card && s->proxy_enable_login_options) {
|
||||
session->remote_guild_card_number = 0;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -572,7 +572,7 @@ Proxy commands (these will only work when exactly one client is connected):\n\
|
||||
auto session = this->get_proxy_session();
|
||||
set_boolean(&session->options.switch_assist, command_args);
|
||||
|
||||
} else if (command_name == "set-save-files") {
|
||||
} else if (command_name == "set-save-files" && this->state->proxy_allow_save_files) {
|
||||
auto session = this->get_proxy_session();
|
||||
set_boolean(&session->options.save_files, command_args);
|
||||
|
||||
|
||||
+2
-1
@@ -34,7 +34,8 @@ ServerState::ServerState()
|
||||
ep3_menu_song(-1),
|
||||
local_address(0),
|
||||
external_address(0),
|
||||
proxy_allow_save_files(true) {
|
||||
proxy_allow_save_files(true),
|
||||
proxy_enable_login_options(false) {
|
||||
vector<shared_ptr<Lobby>> non_v1_only_lobbies;
|
||||
vector<shared_ptr<Lobby>> ep3_only_lobbies;
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ struct ServerState {
|
||||
uint32_t external_address;
|
||||
|
||||
bool proxy_allow_save_files;
|
||||
bool proxy_enable_login_options;
|
||||
|
||||
std::shared_ptr<ProxyServer> proxy_server;
|
||||
std::shared_ptr<Server> game_server;
|
||||
|
||||
Reference in New Issue
Block a user