diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-09 17:37:34 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-09 17:37:34 +0200 |
commit | 47b675e47c6767c03de30854e7bc7071c8a078ea (patch) | |
tree | 8c73bee01afca99eee43f5559cc9145812a267aa /source/cRoot.cpp | |
parent | World generator uses the new Ini interface; also set new defaults for the generator to match the best generation we currently have (diff) | |
download | cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.gz cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.bz2 cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.lz cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.xz cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.zst cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cRoot.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/cRoot.cpp b/source/cRoot.cpp index 69d854ee1..41a1a2432 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -103,13 +103,15 @@ void cRoot::Start() m_Server = new cServer();
LOG("Starting server...");
- cIniFile IniFile("settings.ini"); IniFile.ReadFile();
- int Port = IniFile.GetValueI("Server", "Port", 25565 );
+ cIniFile IniFile("settings.ini");
+ IniFile.ReadFile();
+ int Port = IniFile.GetValueSetI("Server", "Port", 25565 );
if(!m_Server->InitServer( Port ))
{
LOG("Failed to start server, shutting down.");
return;
}
+ IniFile.WriteFile();
cIniFile WebIniFile("webadmin.ini");
if( WebIniFile.ReadFile() )
@@ -210,7 +212,7 @@ void cRoot::LoadWorlds(void) cIniFile IniFile("settings.ini"); IniFile.ReadFile();
// First get the default world
- AString DefaultWorldName = IniFile.GetValue("Worlds", "DefaultWorld", "world");
+ AString DefaultWorldName = IniFile.GetValueSet("Worlds", "DefaultWorld", "world");
m_pState->pDefaultWorld = new cWorld( DefaultWorldName.c_str() );
m_pState->WorldsByName[ DefaultWorldName ] = m_pState->pDefaultWorld;
@@ -224,12 +226,12 @@ void cRoot::LoadWorlds(void) for (unsigned int i = 0; i < NumWorlds; i++)
{
- std::string ValueName = IniFile.GetValueName(KeyNum, i );
+ AString ValueName = IniFile.GetValueName(KeyNum, i );
if (ValueName.compare("World") != 0)
{
continue;
}
- std::string WorldName = IniFile.GetValue(KeyNum, i );
+ AString WorldName = IniFile.GetValue(KeyNum, i );
if (WorldName.empty())
{
continue;
|