From 792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f Mon Sep 17 00:00:00 2001 From: Muhammad Rifqi Priyo Susanto Date: Sat, 13 Jan 2018 18:07:16 +0700 Subject: 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() --- src/network/clientpackethandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/network') 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; -- cgit v1.2.3