diff --git a/src/network/protocols/client_lobby.cpp b/src/network/protocols/client_lobby.cpp index 61453b3c2..2e60d34a3 100644 --- a/src/network/protocols/client_lobby.cpp +++ b/src/network/protocols/client_lobby.cpp @@ -938,6 +938,7 @@ void ClientLobby::connectionRefused(Event* event) } case RR_INCORRECT_PASSWORD: m_server->setReconnectWhenQuitLobby(true); + m_server->setIsPasswordProtected(true); STKHost::get()->setErrorMessage( _("Connection refused: Server password is incorrect.")); break; diff --git a/src/network/server.hpp b/src/network/server.hpp index 280555568..892a43642 100644 --- a/src/network/server.hpp +++ b/src/network/server.hpp @@ -202,6 +202,8 @@ public: // ------------------------------------------------------------------------ virtual void saveServer() const {} // ------------------------------------------------------------------------ + void setIsPasswordProtected(bool password_protected) { m_password_protected = password_protected; } + // ------------------------------------------------------------------------ bool reconnectWhenQuitLobby() const { return m_reconnect_when_quit_lobby; } // ------------------------------------------------------------------------ void setReconnectWhenQuitLobby(bool val)