Skip to content

Commit

Permalink
Make server GUI default to "None" directory if not set.
Browse files Browse the repository at this point in the history
Fixes jamulussoftware#2441. If the directory is not set in the ini file or the command line,
the server should not automatically register to All Genres 1. It should
default to not registering until the user actually chooses a directory.
  • Loading branch information
softins committed Feb 28, 2022
1 parent 74150e5 commit cec679f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,9 @@ directoryAddress = GetIniSetting ( IniXMLDocument, "server", "centralservaddr",

// directory type
// CServerListManager defaults to AT_NONE
// Server GUI defaults to AT_DEFAULT
// Server GUI also defaults to AT_NONE (previously AT_DEFAULT, when registration was controlled by a checkbox)
// Because type could be AT_CUSTOM, it has to be set after the address to avoid multiple registrations
EDirectoryType directoryType = AT_DEFAULT;
EDirectoryType directoryType = AT_NONE;

// if command line is set, use it
if ( CommandLineOptions.contains ( "--centralserver" ) || CommandLineOptions.contains ( "--directoryserver" ) )
Expand All @@ -840,15 +840,6 @@ directoryAddress = GetIniSetting ( IniXMLDocument, "server", "centralservaddr",
}
else
{
// clang-format off
// TODO compatibility to old version < 3.8.2
// if "servlistenabled" exists and is false, set directory type to AT_NONE
if ( GetFlagIniSet ( IniXMLDocument, "server", "servlistenabled", bValue ) && !bValue )
{
directoryType = AT_NONE;
}
// clang-format on

// clang-format off
// TODO compatibility to old version < ?????
// only the case that manual was set in old ini must be considered
Expand Down

0 comments on commit cec679f

Please sign in to comment.