Skip to content

Commit

Permalink
Add setting to disable confirmation on new player registration (#8102)
Browse files Browse the repository at this point in the history
  • Loading branch information
srifqi authored and paramat committed Jan 26, 2019
1 parent 1511086 commit 9126e17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions builtin/settingtypes.txt
Expand Up @@ -912,6 +912,10 @@ serverlist_file (Serverlist file) string favoriteservers.txt
# 0 to disable queueing and -1 to make the queue size unlimited.
max_out_chat_queue_size (Maximum size of the out chat queue) int 20

# Enable register confirmation when connecting to server.
# If disabled, new account will be registered automatically.
enable_register_confirmation (Enable register confirmation) bool true

[*Advanced]

# Timeout for client to remove unused map data from memory.
Expand Down
1 change: 1 addition & 0 deletions src/defaultsettings.cpp
Expand Up @@ -60,6 +60,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_client_modding", "false");
settings->setDefault("max_out_chat_queue_size", "20");
settings->setDefault("pause_on_lost_focus", "false");
settings->setDefault("enable_register_confirmation", "true");

// Keymap
settings->setDefault("remote_port", "30000");
Expand Down
3 changes: 2 additions & 1 deletion src/network/clientpackethandler.cpp
Expand Up @@ -98,7 +98,8 @@ void Client::handleCommand_Hello(NetworkPacket* pkt)
// Authenticate using that method, or abort if there wasn't any method found
if (chosen_auth_mechanism != AUTH_MECHANISM_NONE) {
if (chosen_auth_mechanism == AUTH_MECHANISM_FIRST_SRP
&& !m_simple_singleplayer_mode) {
&& !m_simple_singleplayer_mode
&& g_settings->getBool("enable_register_confirmation")) {
promptConfirmRegistration(chosen_auth_mechanism);
} else {
startAuth(chosen_auth_mechanism);
Expand Down

0 comments on commit 9126e17

Please sign in to comment.