diff options
author | madmaxoft <github@xoft.cz> | 2013-08-05 15:24:23 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-05 15:24:23 +0200 |
commit | ca5561c395332b266b73b9cb56c50d1cc3c275c5 (patch) | |
tree | 5a6310e063575afa144f158069d39a0e5c7617a1 /source | |
parent | Added the Carpet block. (diff) | |
download | cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.tar cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.tar.gz cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.tar.bz2 cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.tar.lz cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.tar.xz cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.tar.zst cuberite-ca5561c395332b266b73b9cb56c50d1cc3c275c5.zip |
Diffstat (limited to '')
-rw-r--r-- | source/GroupManager.cpp | 7 | ||||
-rw-r--r-- | source/Root.cpp | 17 |
2 files changed, 7 insertions, 17 deletions
diff --git a/source/GroupManager.cpp b/source/GroupManager.cpp index 396ad2e2f..cef32dd58 100644 --- a/source/GroupManager.cpp +++ b/source/GroupManager.cpp @@ -47,11 +47,8 @@ cGroupManager::cGroupManager() cIniFile IniFile("groups.ini"); if (!IniFile.ReadFile()) { - LOGINFO("groups.ini inaccessible, using groups.example.ini for defaults!"); - IniFile.Path("groups.example.ini"); - IniFile.ReadFile(); - IniFile.Path("groups.ini"); - IniFile.WriteFile(); + LOGWARNING("groups.ini inaccessible, no groups are defined"); + return; } unsigned int NumKeys = IniFile.GetNumKeys(); diff --git a/source/Root.cpp b/source/Root.cpp index 59242c60d..f12ccc832 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -112,10 +112,7 @@ void cRoot::Start(void) cIniFile IniFile("settings.ini"); if (!IniFile.ReadFile()) { - LOGINFO("settings.ini inaccessible, using settings.example.ini for defaults!"); - IniFile.Path("settings.example.ini"); - IniFile.ReadFile(); - IniFile.Path("settings.ini"); + LOGWARNING("settings.ini inaccessible, all settings are reset to default values"); } m_PrimaryServerVersion = IniFile.GetValueI("Server", "PrimaryServerVersion", 0); if (m_PrimaryServerVersion == 0) @@ -139,23 +136,19 @@ void cRoot::Start(void) cIniFile WebIniFile("webadmin.ini"); if (!WebIniFile.ReadFile()) { - LOGINFO("webadmin.ini inaccessible, using webadmin.example.ini for defaults!"); - WebIniFile.Path("webadmin.example.ini"); - WebIniFile.ReadFile(); - WebIniFile.Path("webadmin.ini"); - WebIniFile.WriteFile(); + LOGWARNING("webadmin.ini inaccessible, wabadmin is disabled"); } - if (WebIniFile.GetValueB("WebAdmin", "Enabled", false )) + if (WebIniFile.GetValueB("WebAdmin", "Enabled", false)) { LOG("Creating WebAdmin..."); m_WebAdmin = new cWebAdmin(8080); } LOG("Loading settings..."); - m_GroupManager = new cGroupManager(); + m_GroupManager = new cGroupManager(); m_CraftingRecipes = new cCraftingRecipes; - m_FurnaceRecipe = new cFurnaceRecipe(); + m_FurnaceRecipe = new cFurnaceRecipe(); LOG("Loading worlds..."); LoadWorlds(); |