1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Disable confirmation dialog on localhost

This commit is contained in:
rubenwardy 2019-02-03 12:31:55 +00:00 committed by Loic Blot
parent b7e1bca28c
commit 7796a3118d
No known key found for this signature in database
GPG key ID: EFAA458E8C153987
3 changed files with 21 additions and 3 deletions

View file

@ -97,9 +97,10 @@ 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
&& g_settings->getBool("enable_register_confirmation")) {
if (chosen_auth_mechanism == AUTH_MECHANISM_FIRST_SRP &&
!m_simple_singleplayer_mode &&
!getServerAddress().isLocalhost() &&
g_settings->getBool("enable_register_confirmation")) {
promptConfirmRegistration(chosen_auth_mechanism);
} else {
startAuth(chosen_auth_mechanism);