Finalize ALL the statements

* Fixed not being able to modify the DB externally while the script is
running
* Made most DB-related errors print the appropriate error string
* Fixed the settings looking for dbsaveinterval in the shard category
instead of the login category
* Added -shr and -wal to .gitignore (even though we're not actually
using WAL mode)

Hopefully the DB code is now free of resource leaks and undefined
behaviour.
This commit is contained in:
2020-12-18 00:17:35 +01:00
parent d3e5b9c485
commit 80dabf4406
3 changed files with 92 additions and 29 deletions

View File

@@ -57,8 +57,8 @@ void settings::init() {
VERBOSITY = reader.GetInteger("", "verbosity", VERBOSITY);
LOGINPORT = reader.GetInteger("login", "port", LOGINPORT);
SHARDPORT = reader.GetInteger("shard", "port", SHARDPORT);
DBSAVEINTERVAL = reader.GetInteger("login", "dbsaveinterval", DBSAVEINTERVAL);
SHARDSERVERIP = reader.Get("shard", "ip", "127.0.0.1");
DBSAVEINTERVAL = reader.GetInteger("shard", "dbsaveinterval", DBSAVEINTERVAL);
TIMEOUT = reader.GetInteger("shard", "timeout", TIMEOUT);
VIEWDISTANCE = reader.GetInteger("shard", "viewdistance", VIEWDISTANCE);
SIMULATEMOBS = reader.GetBoolean("shard", "simulatemobs", SIMULATEMOBS);