Make account sync hooks config-aware

This commit is contained in:
2026-06-08 04:43:21 -04:00
parent 94250d21eb
commit 70dd22ee8c
2 changed files with 83 additions and 5 deletions
+2
View File
@@ -18,6 +18,7 @@
#include "SendCommands.hh"
#include "Text.hh"
#include "TextIndex.hh"
#include "AccountSync.hh"
#ifdef PHOSG_WINDOWS
static constexpr bool IS_WINDOWS = true;
@@ -879,6 +880,7 @@ void ServerState::load_config_early() {
this->client_ping_interval_usecs = this->config_json->get_int("ClientPingInterval", 30000000);
this->client_idle_timeout_usecs = this->config_json->get_int("ClientIdleTimeout", 60000000);
this->patch_client_idle_timeout_usecs = this->config_json->get_int("PatchClientIdleTimeout", 300000000);
AccountSync::configure_from_json(this->config_json->get("AccountSync", phosg::JSON::dict()));
this->psopeeps_dcv2_exp_multiplier = this->config_json->get_int("PsoPeepsDCV2EXPMultiplier", 5);
if ((this->psopeeps_dcv2_exp_multiplier != 5) && (this->psopeeps_dcv2_exp_multiplier != 10)) {
throw std::runtime_error("PsoPeepsDCV2EXPMultiplier must be 5 or 10");