[General] Use address keys with clearer meaning in tes3mp config files

pull/249/merge
David Cernat 8 years ago
parent 99640da111
commit c899525e30

@ -186,7 +186,7 @@ int main(int argc, char *argv[])
auto version = Version::getOpenmwVersion(variables["resources"].as<Files::EscapeHashString>().toStdString()); auto version = Version::getOpenmwVersion(variables["resources"].as<Files::EscapeHashString>().toStdString());
int logLevel = mgr.getInt("loglevel", "General"); int logLevel = mgr.getInt("logLevel", "General");
if (logLevel < Log::LOG_VERBOSE || logLevel > Log::LOG_FATAL) if (logLevel < Log::LOG_VERBOSE || logLevel > Log::LOG_FATAL)
logLevel = Log::LOG_VERBOSE; logLevel = Log::LOG_VERBOSE;
@ -219,8 +219,8 @@ int main(int argc, char *argv[])
LOG_INIT(logLevel); LOG_INIT(logLevel);
int players = mgr.getInt("players", "General"); int players = mgr.getInt("maximumPlayers", "General");
string addr = mgr.getString("address", "General"); string addr = mgr.getString("localAddress", "General");
int port = mgr.getInt("port", "General"); int port = mgr.getInt("port", "General");
string passw = mgr.getString("password", "General"); string passw = mgr.getString("password", "General");

@ -153,11 +153,11 @@ bool Main::init(std::vector<std::string> &content, Files::Collections &collectio
Settings::Manager mgr; Settings::Manager mgr;
InitMgr(mgr); InitMgr(mgr);
int logLevel = mgr.getInt("loglevel", "General"); int logLevel = mgr.getInt("logLevel", "General");
Log::SetLevel(logLevel); Log::SetLevel(logLevel);
if (addr.empty()) if (addr.empty())
{ {
pMain->server = mgr.getString("server", "General"); pMain->server = mgr.getString("destinationAddress", "General");
pMain->port = (unsigned short) mgr.getInt("port", "General"); pMain->port = (unsigned short) mgr.getInt("port", "General");
passw = mgr.getString("password", "General"); passw = mgr.getString("password", "General");

@ -1,9 +1,9 @@
[General] [General]
server = mp.tes3mp.com destinationAddress = localhost
port = 25565 port = 25565
password = password =
# 0 - Verbose (spam), 1 - Info, 2 - Warnings, 3 - Errors, 4 - Only fatal errors # 0 - Verbose (spam), 1 - Info, 2 - Warnings, 3 - Errors, 4 - Only fatal errors
loglevel = 0 logLevel = 0
[Master] [Master]
address = master.tes3mp.com address = master.tes3mp.com
@ -20,4 +20,5 @@ x = 0
y = 0 y = 0
w = 390 w = 390
h = 250 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

@ -1,15 +1,14 @@
[General] [General]
address = 0.0.0.0 localAddress = 0.0.0.0
port = 25565 port = 25565
players = 64 maximumPlayers = 64
hostname = My TES3MP server hostname = My TES3MP server
# 0 - Verbose (spam), 1 - Info, 2 - Warnings, 3 - Errors, 4 - Only fatal errors # 0 - Verbose (spam), 1 - Info, 2 - Warnings, 3 - Errors, 4 - Only fatal errors
loglevel = 1 logLevel = 1
password = password =
[Plugins] [Plugins]
#home = ~/local/openmw/tes3mp home = ~/local/openmw/tes3mp
home = ~/ClionProjects/PS-dev
plugins = server.lua plugins = server.lua
[MasterServer] [MasterServer]

Loading…
Cancel
Save