Made settings.ini default to settings.example.ini when it doesn't exist
I suggest to do the same with the other ini files? git-svn-id: http://mc-server.googlecode.com/svn/trunk@1030 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
8f637d401d
commit
727446f6d5
@ -98,7 +98,12 @@ void cRoot::Start()
|
||||
|
||||
LOG("Starting server...");
|
||||
cIniFile IniFile("settings.ini");
|
||||
IniFile.ReadFile();
|
||||
if ( IniFile.ReadFile() == false )
|
||||
{
|
||||
IniFile.Path("settings.example.ini");
|
||||
IniFile.ReadFile();
|
||||
IniFile.Path("settings.ini");
|
||||
}
|
||||
m_PrimaryServerVersion = IniFile.GetValueSetI("Server", "PrimaryServerVersion", cProtocolRecognizer::PROTO_VERSION_1_4_2);
|
||||
|
||||
int Port = IniFile.GetValueSetI("Server", "Port", 25565 );
|
||||
|
Loading…
Reference in New Issue
Block a user