Skip to content

Commit 9126e17

Browse files
srifqiparamat
authored andcommittedJan 26, 2019
Add setting to disable confirmation on new player registration (#8102)
1 parent 1511086 commit 9126e17

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
 

‎builtin/settingtypes.txt

+4
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,10 @@ serverlist_file (Serverlist file) string favoriteservers.txt
912912
# 0 to disable queueing and -1 to make the queue size unlimited.
913913
max_out_chat_queue_size (Maximum size of the out chat queue) int 20
914914

915+
# Enable register confirmation when connecting to server.
916+
# If disabled, new account will be registered automatically.
917+
enable_register_confirmation (Enable register confirmation) bool true
918+
915919
[*Advanced]
916920

917921
# Timeout for client to remove unused map data from memory.

‎src/defaultsettings.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ void set_default_settings(Settings *settings)
6060
settings->setDefault("enable_client_modding", "false");
6161
settings->setDefault("max_out_chat_queue_size", "20");
6262
settings->setDefault("pause_on_lost_focus", "false");
63+
settings->setDefault("enable_register_confirmation", "true");
6364

6465
// Keymap
6566
settings->setDefault("remote_port", "30000");

‎src/network/clientpackethandler.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ void Client::handleCommand_Hello(NetworkPacket* pkt)
9898
// Authenticate using that method, or abort if there wasn't any method found
9999
if (chosen_auth_mechanism != AUTH_MECHANISM_NONE) {
100100
if (chosen_auth_mechanism == AUTH_MECHANISM_FIRST_SRP
101-
&& !m_simple_singleplayer_mode) {
101+
&& !m_simple_singleplayer_mode
102+
&& g_settings->getBool("enable_register_confirmation")) {
102103
promptConfirmRegistration(chosen_auth_mechanism);
103104
} else {
104105
startAuth(chosen_auth_mechanism);

0 commit comments

Comments
 (0)
Please sign in to comment.