From c899525e30cb0081fd7864229aad8a6f8d0f7eeb Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 3 Jul 2017 01:31:48 +0300 Subject: [PATCH] [General] Use address keys with clearer meaning in tes3mp config files --- apps/openmw-mp/main.cpp | 6 +++--- apps/openmw/mwmp/Main.cpp | 4 ++-- files/tes3mp/tes3mp-client-default.cfg | 7 ++++--- files/tes3mp/tes3mp-server-default.cfg | 9 ++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index e63f82fbb..583053419 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) auto version = Version::getOpenmwVersion(variables["resources"].as().toStdString()); - int logLevel = mgr.getInt("loglevel", "General"); + int logLevel = mgr.getInt("logLevel", "General"); if (logLevel < Log::LOG_VERBOSE || logLevel > Log::LOG_FATAL) logLevel = Log::LOG_VERBOSE; @@ -219,8 +219,8 @@ int main(int argc, char *argv[]) LOG_INIT(logLevel); - int players = mgr.getInt("players", "General"); - string addr = mgr.getString("address", "General"); + int players = mgr.getInt("maximumPlayers", "General"); + string addr = mgr.getString("localAddress", "General"); int port = mgr.getInt("port", "General"); string passw = mgr.getString("password", "General"); diff --git a/apps/openmw/mwmp/Main.cpp b/apps/openmw/mwmp/Main.cpp index 0a1697217..38f2854cf 100644 --- a/apps/openmw/mwmp/Main.cpp +++ b/apps/openmw/mwmp/Main.cpp @@ -153,11 +153,11 @@ bool Main::init(std::vector &content, Files::Collections &collectio Settings::Manager mgr; InitMgr(mgr); - int logLevel = mgr.getInt("loglevel", "General"); + int logLevel = mgr.getInt("logLevel", "General"); Log::SetLevel(logLevel); if (addr.empty()) { - pMain->server = mgr.getString("server", "General"); + pMain->server = mgr.getString("destinationAddress", "General"); pMain->port = (unsigned short) mgr.getInt("port", "General"); passw = mgr.getString("password", "General"); diff --git a/files/tes3mp/tes3mp-client-default.cfg b/files/tes3mp/tes3mp-client-default.cfg index 0ebed987e..2430e7da6 100644 --- a/files/tes3mp/tes3mp-client-default.cfg +++ b/files/tes3mp/tes3mp-client-default.cfg @@ -1,9 +1,9 @@ [General] -server = mp.tes3mp.com +destinationAddress = localhost port = 25565 password = # 0 - Verbose (spam), 1 - Info, 2 - Warnings, 3 - Errors, 4 - Only fatal errors -loglevel = 0 +logLevel = 0 [Master] address = master.tes3mp.com @@ -20,4 +20,5 @@ x = 0 y = 0 w = 390 h = 250 -delay = 5.0 # How long the message will be displayed in hidden mode +# How long the message will be displayed in hidden mode +delay = 5.0 diff --git a/files/tes3mp/tes3mp-server-default.cfg b/files/tes3mp/tes3mp-server-default.cfg index 02439710e..b958bf893 100644 --- a/files/tes3mp/tes3mp-server-default.cfg +++ b/files/tes3mp/tes3mp-server-default.cfg @@ -1,15 +1,14 @@ [General] -address = 0.0.0.0 +localAddress = 0.0.0.0 port = 25565 -players = 64 +maximumPlayers = 64 hostname = My TES3MP server # 0 - Verbose (spam), 1 - Info, 2 - Warnings, 3 - Errors, 4 - Only fatal errors -loglevel = 1 +logLevel = 1 password = [Plugins] -#home = ~/local/openmw/tes3mp -home = ~/ClionProjects/PS-dev +home = ~/local/openmw/tes3mp plugins = server.lua [MasterServer]