for server name/city/country and licence, the command line overwrites the ini-file setting
This commit is contained in:
parent
10abcff239
commit
51d3c95de0
1 changed files with 23 additions and 14 deletions
|
@ -799,6 +799,11 @@ if ( GetFlagIniSet ( IniXMLDocument, "server", "defcentservaddr", bValue ) )
|
||||||
strLanguage = GetIniSetting ( IniXMLDocument, "server", "language",
|
strLanguage = GetIniSetting ( IniXMLDocument, "server", "language",
|
||||||
CLocale::FindSysLangTransFileName ( CLocale::GetAvailableTranslations() ).first );
|
CLocale::FindSysLangTransFileName ( CLocale::GetAvailableTranslations() ).first );
|
||||||
|
|
||||||
|
// name/city/country (command line overwrites setting file, note that
|
||||||
|
// name/city/country are set by one single command line argument so we
|
||||||
|
// can treat them combined here and it is sufficient to just check the name)
|
||||||
|
if ( pServer->GetServerName().isEmpty() )
|
||||||
|
{
|
||||||
// name
|
// name
|
||||||
pServer->SetServerName ( GetIniSetting ( IniXMLDocument, "server", "name" ) );
|
pServer->SetServerName ( GetIniSetting ( IniXMLDocument, "server", "name" ) );
|
||||||
|
|
||||||
|
@ -811,6 +816,7 @@ if ( GetFlagIniSet ( IniXMLDocument, "server", "defcentservaddr", bValue ) )
|
||||||
{
|
{
|
||||||
pServer->SetServerCountry ( static_cast<QLocale::Country> ( iValue ) );
|
pServer->SetServerCountry ( static_cast<QLocale::Country> ( iValue ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// start minimized on OS start
|
// start minimized on OS start
|
||||||
if ( GetFlagIniSet ( IniXMLDocument, "server", "autostartmin", bValue ) )
|
if ( GetFlagIniSet ( IniXMLDocument, "server", "autostartmin", bValue ) )
|
||||||
|
@ -818,12 +824,15 @@ if ( GetFlagIniSet ( IniXMLDocument, "server", "defcentservaddr", bValue ) )
|
||||||
pServer->SetAutoRunMinimized ( bValue );
|
pServer->SetAutoRunMinimized ( bValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
// licence type
|
// licence type (command line overwrites setting file)
|
||||||
|
if ( pServer->GetLicenceType() == LT_NO_LICENCE )
|
||||||
|
{
|
||||||
if ( GetNumericIniSet ( IniXMLDocument, "server", "licencetype",
|
if ( GetNumericIniSet ( IniXMLDocument, "server", "licencetype",
|
||||||
0, 1 /* LT_CREATIVECOMMONS */, iValue ) )
|
0, 1 /* LT_CREATIVECOMMONS */, iValue ) )
|
||||||
{
|
{
|
||||||
pServer->SetLicenceType ( static_cast<ELicenceType> ( iValue ) );
|
pServer->SetLicenceType ( static_cast<ELicenceType> ( iValue ) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// welcome message (command line overwrites setting file)
|
// welcome message (command line overwrites setting file)
|
||||||
if ( pServer->GetWelcomeMessage().isEmpty() )
|
if ( pServer->GetWelcomeMessage().isEmpty() )
|
||||||
|
|
Loading…
Reference in a new issue