23 #include "../bscript/config.h" 24 #include "../clib/Debugging/ExceptionParser.h" 25 #include "../clib/cfgelem.h" 26 #include "../clib/cfgfile.h" 27 #include "../clib/fileutil.h" 28 #include "../clib/logfacility.h" 29 #include "../clib/mdump.h" 30 #include "../clib/passert.h" 31 #include "../clib/strutil.h" 32 #include "../plib/systemstate.h" 44 struct stat PolConfig::pol_cfg_stat;
55 stat(
"pol.cfg", &pol_cfg_stat );
89 if ( max_obj < EXTOBJ_HIGHEST_DEFAULT || max_obj > 0xFFFFFFFF )
121 elem.
remove_bool(
"CacheInteractiveScripts",
true );
141 std::string tmp = elem.
remove_string(
"AssertionFailureAction",
"abort" );
194 "Unknown pol.cfg AssertionFailureAction value: {} (expected abort, continue, shutdown, or " 195 "shutdown-nosave)\n" )
212 "Unknown pol.cfg ShutdownSaveType value: {} (expected full or incremental)\n" )
220 elem.
remove_bool(
"DisplayUnknownPackets",
false );
227 elem.
remove_bool(
"ThreadStacktracesWhenStuck",
false );
230 elem.
remove_bool(
"ReportRunToCompletionScripts",
true );
240 elem.
remove_bool(
"AllowMultiClientsPerAccount",
false );
243 elem.
remove_bool(
"RetainCleartextPasswords",
false );
255 elem.
remove_bool(
"ThreadDecayStatistics",
false );
258 bool reportingActive = elem.
remove_bool(
"ReportCrashsAutomatically",
false );
259 std::string reportingAdminEmail = elem.
remove_string(
"ReportAdminEmail",
"" );
260 std::string reportingServer = elem.
remove_string(
"ReportServer",
"polserver.com" );
261 std::string reportingUrl = elem.
remove_string(
"ReportURL",
"/pol/report_program_abort.php" );
263 reportingActive, reportingServer, reportingUrl, reportingAdminEmail );
287 stat(
"pol.cfg", &newst );
290 ( newst.st_mtime < time(
nullptr ) - 10 ) )
299 catch ( std::exception& ex )
301 POLLOG_ERROR <<
"Error rereading pol.cfg: " << ex.what() <<
"\n";
int assertion_shutdown_save_type
unsigned short web_server_debug
unsigned short debug_level
std::string remove_string(const char *propname)
unsigned short max_clients
std::string debug_password
std::string world_data_path
static CPropProfiler & instance()
static void read_pol_config(bool initial_load)
unsigned int runaway_script_threshold
unsigned short listen_port
unsigned int remove_ulong(const char *propname)
bool enforce_mount_objtype
int remove_int(const char *propname)
EScriptConfig escript_config
bool enable_secure_trading
#define THREAD_CHECKPOINT(thread, check)
bool LogfileTimestampEveryLine
bool retain_cleartext_passwords
static void reload_pol_cfg()
static void configureProgramAbortReportingSystem(bool active, std::string server, std::string url, std::string reporter)
Configures the bug reporting system.
std::string web_server_password
unsigned short max_clients_bypass_cmdlevel
void readraw(ConfigElem &elem)
unsigned short debug_port
#define EXTOBJ_HIGHEST_DEFAULT
Crypt::TCryptInfo client_encryption_version
bool log_traces_when_stuck
unsigned short select_timeout_usecs
static void SetMiniDumpType(const std::string &dumptype)
const int SAVE_INCREMENTAL
bool display_unknown_packets
static struct stat pol_cfg_stat
unsigned short multithread
bool web_server_local_only
unsigned short web_server_port
std::string minidump_type
bool report_missing_configs
unsigned short min_cmdlevel_to_login
unsigned int max_call_depth
bool cache_interactive_scripts
bool use_single_thread_login
void CalculateCryptKeys(const std::string &name, TCryptInfo &infoCrypt)
std::string strlower(const std::string &str)
static bool programAbortReporting()
Returns true if the bug reporting is active.
bool count_resource_tiles
bool allow_multi_clients_per_account
unsigned short inactivity_disconnect_timeout
unsigned short remove_ushort(const char *propname)
unsigned short inactivity_warning_timeout
bool report_program_aborts()
Returns true if program aborts are reported.
std::string realm_data_path
std::string normalized_dir_form(const std::string &istr)
std::string uo_datafile_root
bool report_critical_scripts
unsigned short character_slots
unsigned remove_unsigned(const char *propname)
bool remove_bool(const char *propname)
bool thread_decay_statistics
std::unique_ptr< PeriodicTask > write_account_task
unsigned short min_cmdlvl_ignore_inactivity