summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-05 22:24:23 +0100
committerMattes D <github@xoft.cz>2013-11-05 22:24:23 +0100
commit12eeb3f6c88f54b77363923fcff2bd4ce53ff07f (patch)
tree3ed83d1132a2b1a8b6f9e36a7d6f3a527d258992 /source/Root.cpp
parentClarified cBlockHandler::ConvertToPickups() dox. (diff)
parentImplemented suggestions (diff)
downloadcuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar
cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.gz
cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.bz2
cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.lz
cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.xz
cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.tar.zst
cuberite-12eeb3f6c88f54b77363923fcff2bd4ce53ff07f.zip
Diffstat (limited to '')
-rw-r--r--source/Root.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index e992ff614..8ec94629b 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -119,8 +119,12 @@ void cRoot::Start(void)
cIniFile IniFile;
if (!IniFile.ReadFile("settings.ini"))
{
- LOGWARNING("settings.ini inaccessible, all settings are reset to default values");
+ LOGWARN("Regenerating settings.ini, all settings will be reset");
+ IniFile.AddHeaderComment(" This is the main server configuration");
+ IniFile.AddHeaderComment(" Most of the settings here can be configured using the webadmin interface, if enabled in webadmin.ini");
+ IniFile.AddHeaderComment(" See: http://www.mc-server.org/wiki/doku.php?id=configure:settings.ini for further configuration help");
}
+
m_PrimaryServerVersion = IniFile.GetValueI("Server", "PrimaryServerVersion", 0);
if (m_PrimaryServerVersion == 0)
{
@@ -129,7 +133,7 @@ void cRoot::Start(void)
else
{
// Make a note in the log that the primary server version is explicitly set in the ini file
- LOGINFO("settings.ini: [Server].PrimaryServerVersion set to %d.", m_PrimaryServerVersion);
+ LOGINFO("Primary server version set explicitly to %d.", m_PrimaryServerVersion);
}
LOG("Starting server...");
@@ -152,7 +156,7 @@ void cRoot::Start(void)
LOGD("Loading plugin manager...");
m_PluginManager = new cPluginManager();
- m_PluginManager->ReloadPluginsNow();
+ m_PluginManager->ReloadPluginsNow(IniFile);
LOGD("Loading MonsterConfig...");
m_MonsterConfig = new cMonsterConfig;
@@ -261,6 +265,7 @@ void cRoot::LoadWorlds(cIniFile & IniFile)
return;
}
+ bool FoundAdditionalWorlds = false;
for (unsigned int i = 0; i < NumWorlds; i++)
{
AString ValueName = IniFile.GetValueName(KeyNum, i );
@@ -273,9 +278,15 @@ void cRoot::LoadWorlds(cIniFile & IniFile)
{
continue;
}
+ FoundAdditionalWorlds = true;
cWorld* NewWorld = new cWorld( WorldName.c_str() );
m_WorldsByName[ WorldName ] = NewWorld;
} // for i - Worlds
+
+ if (!FoundAdditionalWorlds)
+ {
+ IniFile.AddKeyComment("Worlds", " World=secondworld");
+ }
}