diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2019-01-27 02:26:37 +0700 |
---|---|---|
committer | Paramat <paramat@users.noreply.github.com> | 2019-01-26 19:26:37 +0000 |
commit | 9126e1791da52dff1ccaac673807f5d9d10a3da8 (patch) | |
tree | c18b70059ed60d266e83c6759c344b4919c7ca56 /src | |
parent | 15110864c82ef1c8426a1d4efe5f2b5ce7c6ffd7 (diff) | |
download | minetest-9126e1791da52dff1ccaac673807f5d9d10a3da8.tar.gz minetest-9126e1791da52dff1ccaac673807f5d9d10a3da8.tar.bz2 minetest-9126e1791da52dff1ccaac673807f5d9d10a3da8.zip |
Add setting to disable confirmation on new player registration (#8102)
Diffstat (limited to 'src')
-rw-r--r-- | src/defaultsettings.cpp | 1 | ||||
-rw-r--r-- | src/network/clientpackethandler.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index daa015927..64231c74c 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -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"); diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 6c0b770fa..909d336ae 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -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); |