summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorMuhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>2018-01-13 18:07:16 +0700
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-01-13 12:07:16 +0100
commit792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f (patch)
tree568b578dd8cd5d0e579a4debc560d088c880d5e7 /src/network
parentfad263dec9e1fa7ae0886f768e22d8ee74e8553b (diff)
downloadminetest-792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f.tar.gz
minetest-792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f.tar.bz2
minetest-792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f.zip
Add confirmation on new player registration (#6849)
* Attempt to add registration confirmation Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist. Also tell player about the server and chosen username. Local game has localhost as IP address of the server. Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background. aborted -> connection_aborted * Rewrite information message text Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 0ec46049e..14aa7b6e6 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -96,7 +96,12 @@ 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) {
- startAuth(chosen_auth_mechanism);
+ if (chosen_auth_mechanism == AUTH_MECHANISM_FIRST_SRP
+ && !m_simple_singleplayer_mode) {
+ promptConfirmRegistration(chosen_auth_mechanism);
+ } else {
+ startAuth(chosen_auth_mechanism);
+ }
} else {
m_chosen_auth_mech = AUTH_MECHANISM_NONE;
m_access_denied = true;