make hide_download_commands configurable
This commit is contained in:
+2
-1
@@ -191,7 +191,8 @@ Client::Client(
|
|||||||
// Don't print data sent to patch clients to the logs. The patch server
|
// Don't print data sent to patch clients to the logs. The patch server
|
||||||
// protocol is fully understood and data logs for patch clients are generally
|
// protocol is fully understood and data logs for patch clients are generally
|
||||||
// more annoying than helpful at this point.
|
// more annoying than helpful at this point.
|
||||||
if ((this->channel.version == Version::PC_PATCH) || (this->channel.version == Version::BB_PATCH)) {
|
if ((server->get_state()->hide_download_commands) &&
|
||||||
|
((this->channel.version == Version::PC_PATCH) || (this->channel.version == Version::BB_PATCH))) {
|
||||||
this->channel.terminal_recv_color = TerminalFormat::END;
|
this->channel.terminal_recv_color = TerminalFormat::END;
|
||||||
this->channel.terminal_send_color = TerminalFormat::END;
|
this->channel.terminal_send_color = TerminalFormat::END;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1135,7 +1135,7 @@ static void on_93_BB(shared_ptr<Client> c, uint16_t, uint32_t, string& data) {
|
|||||||
// command.
|
// command.
|
||||||
on_login_complete(c);
|
on_login_complete(c);
|
||||||
|
|
||||||
} else {
|
} else if (s->hide_download_commands) {
|
||||||
// The BB data server protocol is fairly well-understood and has some large
|
// The BB data server protocol is fairly well-understood and has some large
|
||||||
// commands, so we omit data logging for clients on the data server.
|
// commands, so we omit data logging for clients on the data server.
|
||||||
c->log.info("Client is in the BB data server phase; disabling command data logging for the rest of this client\'s session");
|
c->log.info("Client is in the BB data server phase; disabling command data logging for the rest of this client\'s session");
|
||||||
|
|||||||
+2
-1
@@ -3206,7 +3206,8 @@ void send_quest_file_chunk(
|
|||||||
cmd.data_size = size;
|
cmd.data_size = size;
|
||||||
|
|
||||||
c->log.info("Sending quest file chunk %s:%zu", filename.c_str(), chunk_index);
|
c->log.info("Sending quest file chunk %s:%zu", filename.c_str(), chunk_index);
|
||||||
c->channel.send(is_download_quest ? 0xA7 : 0x13, chunk_index, &cmd, sizeof(cmd), true);
|
const auto& s = c->require_server_state();
|
||||||
|
c->channel.send(is_download_quest ? 0xA7 : 0x13, chunk_index, &cmd, sizeof(cmd), s->hide_download_commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename CommandT>
|
template <typename CommandT>
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ ServerState::ServerState(shared_ptr<struct event_base> base, const string& confi
|
|||||||
ep3_final_round_meseta_bonus(300),
|
ep3_final_round_meseta_bonus(300),
|
||||||
ep3_jukebox_is_free(false),
|
ep3_jukebox_is_free(false),
|
||||||
ep3_behavior_flags(0),
|
ep3_behavior_flags(0),
|
||||||
|
hide_download_commands(true),
|
||||||
run_shell_behavior(RunShellBehavior::DEFAULT),
|
run_shell_behavior(RunShellBehavior::DEFAULT),
|
||||||
cheat_mode_behavior(BehaviorSwitch::OFF_BY_DEFAULT),
|
cheat_mode_behavior(BehaviorSwitch::OFF_BY_DEFAULT),
|
||||||
bb_global_exp_multiplier(1),
|
bb_global_exp_multiplier(1),
|
||||||
@@ -719,6 +720,7 @@ void ServerState::parse_config(const JSON& json, bool is_reload) {
|
|||||||
this->ep3_jukebox_is_free = json.get_bool("Episode3JukeboxIsFree", this->ep3_jukebox_is_free);
|
this->ep3_jukebox_is_free = json.get_bool("Episode3JukeboxIsFree", this->ep3_jukebox_is_free);
|
||||||
this->ep3_behavior_flags = json.get_int("Episode3BehaviorFlags", this->ep3_behavior_flags);
|
this->ep3_behavior_flags = json.get_int("Episode3BehaviorFlags", this->ep3_behavior_flags);
|
||||||
this->ep3_card_auction_points = json.get_int("CardAuctionPoints", this->ep3_card_auction_points);
|
this->ep3_card_auction_points = json.get_int("CardAuctionPoints", this->ep3_card_auction_points);
|
||||||
|
this->hide_download_commands = json.get_bool("HideDownloadCommands", this->hide_download_commands);
|
||||||
this->proxy_allow_save_files = json.get_bool("ProxyAllowSaveFiles", this->proxy_allow_save_files);
|
this->proxy_allow_save_files = json.get_bool("ProxyAllowSaveFiles", this->proxy_allow_save_files);
|
||||||
this->proxy_enable_login_options = json.get_bool("ProxyEnableLoginOptions", this->proxy_enable_login_options);
|
this->proxy_enable_login_options = json.get_bool("ProxyEnableLoginOptions", this->proxy_enable_login_options);
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ struct ServerState : public std::enable_shared_from_this<ServerState> {
|
|||||||
uint32_t ep3_final_round_meseta_bonus;
|
uint32_t ep3_final_round_meseta_bonus;
|
||||||
bool ep3_jukebox_is_free;
|
bool ep3_jukebox_is_free;
|
||||||
uint32_t ep3_behavior_flags;
|
uint32_t ep3_behavior_flags;
|
||||||
|
bool hide_download_commands;
|
||||||
RunShellBehavior run_shell_behavior;
|
RunShellBehavior run_shell_behavior;
|
||||||
BehaviorSwitch cheat_mode_behavior;
|
BehaviorSwitch cheat_mode_behavior;
|
||||||
std::vector<std::shared_ptr<const PSOBBEncryption::KeyFile>> bb_private_keys;
|
std::vector<std::shared_ptr<const PSOBBEncryption::KeyFile>> bb_private_keys;
|
||||||
|
|||||||
@@ -226,6 +226,11 @@
|
|||||||
// Static game data messages describe the loading of any kind of game data.
|
// Static game data messages describe the loading of any kind of game data.
|
||||||
"StaticGameData": "INFO",
|
"StaticGameData": "INFO",
|
||||||
},
|
},
|
||||||
|
// Some large commands (especially during the BB login sequence) can clutter
|
||||||
|
// up logs, so we hide these commands by default. If you're investigating or
|
||||||
|
// submitting a bug report that occurs on BB clients, set this to false to get
|
||||||
|
// a full session log before submitting your report.
|
||||||
|
"HideDownloadCommands": true,
|
||||||
|
|
||||||
// If this option is disabled, the server only allows users who have licenses
|
// If this option is disabled, the server only allows users who have licenses
|
||||||
// on the server to connect. If this is enabled, all users will be allowed to
|
// on the server to connect. If this is enabled, all users will be allowed to
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
"GameServer": "INFO",
|
"GameServer": "INFO",
|
||||||
"StaticGameData": "INFO",
|
"StaticGameData": "INFO",
|
||||||
},
|
},
|
||||||
|
"HideDownloadCommands": true,
|
||||||
|
|
||||||
"AllowUnregisteredUsers": true,
|
"AllowUnregisteredUsers": true,
|
||||||
"AllowPCNTE": true,
|
"AllowPCNTE": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user