1; This file is part of OpenTTD.
2; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
3; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
4; See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
5;
6
7; Network settings as stored in the secrets configuration file ("secrets.cfg").
8
9[pre-amble]
10static bool ReplaceAsteriskWithEmptyPassword(std::string &newval);
11
12static const SettingVariant _network_secrets_settings_table[] = {
13[post-amble]
14};
15[templates]
16SDTC_SSTR  =  SDTC_SSTR(              $var, $type, $flags, $def,             $length,                                  $pre_cb, $post_cb, $from, $to,        $cat, $extra, $startup),
17
18[validation]
19
20[defaults]
21flags    = SF_NONE
22interval = 0
23str      = STR_NULL
24strhelp  = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
25strval   = STR_NULL
26pre_cb   = nullptr
27post_cb  = nullptr
28load     = nullptr
29from     = SL_MIN_VERSION
30to       = SL_MAX_VERSION
31cat      = SC_ADVANCED
32extra    = 0
33startup  = false
34
35
36
37[SDTC_SSTR]
38var      = network.server_password
39type     = SLE_STR
40length   = NETWORK_PASSWORD_LENGTH
41flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
42def      = nullptr
43pre_cb   = ReplaceAsteriskWithEmptyPassword
44post_cb  = [](auto) { NetworkServerUpdateGameInfo(); }
45cat      = SC_BASIC
46
47[SDTC_SSTR]
48var      = network.rcon_password
49type     = SLE_STR
50length   = NETWORK_PASSWORD_LENGTH
51flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
52def      = nullptr
53pre_cb   = ReplaceAsteriskWithEmptyPassword
54cat      = SC_BASIC
55
56[SDTC_SSTR]
57var      = network.admin_password
58type     = SLE_STR
59length   = NETWORK_PASSWORD_LENGTH
60flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
61def      = nullptr
62cat      = SC_BASIC
63
64[SDTC_SSTR]
65var      = network.default_company_pass
66type     = SLE_STR
67length   = NETWORK_PASSWORD_LENGTH
68flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
69def      = nullptr
70
71[SDTC_SSTR]
72var      = network.network_id
73type     = SLE_STR
74length   = NETWORK_SERVER_ID_LENGTH
75flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
76def      = nullptr
77
78[SDTC_SSTR]
79var      = network.server_invite_code
80type     = SLE_STR
81length   = NETWORK_INVITE_CODE_LENGTH
82flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
83def      = nullptr
84
85[SDTC_SSTR]
86var      = network.server_invite_code_secret
87type     = SLE_STR
88length   = NETWORK_INVITE_CODE_SECRET_LENGTH
89flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
90def      = nullptr
91