diff --git a/Client/core/CClientVariables.cpp b/Client/core/CClientVariables.cpp index 0397dbf264..85dee800fa 100644 --- a/Client/core/CClientVariables.cpp +++ b/Client/core/CClientVariables.cpp @@ -274,9 +274,6 @@ void CClientVariables::LoadDefaults() DEFAULT("host", _S("127.0.0.1")); // hostname DEFAULT("port", 22003); // port DEFAULT("password", _S("")); // password - DEFAULT("qc_host", _S("127.0.0.1")); // quick connect hostname - DEFAULT("qc_port", 22003); // quick connect port - DEFAULT("qc_password", _S("")); // quick connect password DEFAULT("debugfile", _S("")); // debug filename DEFAULT("console_pos", CVector2D(0, 0)); // console position DEFAULT("console_size", CVector2D(200, 200)); // console size @@ -359,7 +356,6 @@ void CClientVariables::LoadDefaults() DEFAULT("allow_discord_rpc", true); // Enable Discord Rich Presence DEFAULT("discord_rpc_share_data", false); // Consistent Rich Presence data sharing DEFAULT("discord_rpc_share_data_firsttime", false); // Display the user data sharing consent dialog box - for the first time - DEFAULT("_beta_qc_rightclick_command", _S("reconnect")); // Command to run when right clicking quick connect (beta - can be removed at any time) DEFAULT("browser_enable_gpu", true); // Enable GPU in CEF? (allows stuff like WebGL to function) if (!Exists("locale")) diff --git a/Client/core/CCommandFuncs.cpp b/Client/core/CCommandFuncs.cpp index a2ca37ccbd..294a58e01e 100644 --- a/Client/core/CCommandFuncs.cpp +++ b/Client/core/CCommandFuncs.cpp @@ -302,7 +302,6 @@ void CCommandFuncs::Reconnect(const char* szParameters) unsigned int uiPort; CVARS_GET("host", strHost); - CVARS_GET("nick", strNick); CVARS_GET("password", strPassword); CVARS_GET("port", uiPort); @@ -315,7 +314,7 @@ void CCommandFuncs::Reconnect(const char* szParameters) // Verify and convert the port number if (uiPort <= 0 || uiPort > 0xFFFF) { - CCore::GetSingleton().GetConsole()->Print(_("connect: Bad port number")); + CCore::GetSingleton().GetConsole()->Print(_("reconnect: Bad port number")); return; } @@ -330,16 +329,16 @@ void CCommandFuncs::Reconnect(const char* szParameters) // Start the connect if (CCore::GetSingleton().GetConnectManager()->Reconnect(strHost.c_str(), usPort, strPassword.c_str(), false)) { - CCore::GetSingleton().GetConsole()->Printf(_("connect: Connecting to %s:%u..."), strHost.c_str(), usPort); + CCore::GetSingleton().GetConsole()->Printf(_("reconnect: Reconnecting to %s:%u..."), strHost.c_str(), usPort); } else { - CCore::GetSingleton().GetConsole()->Printf(_("connect: could not connect to %s:%u!"), strHost.c_str(), usPort); + CCore::GetSingleton().GetConsole()->Printf(_("reconnect: could not connect to %s:%u!"), strHost.c_str(), usPort); } } else { - CCore::GetSingleton().GetConsole()->Print("connect: Failed to unload current mod"); + CCore::GetSingleton().GetConsole()->Print("reconnect: Failed to unload current mod"); } } diff --git a/Client/core/CConnectManager.cpp b/Client/core/CConnectManager.cpp index d53cdc8934..4c15524d7c 100644 --- a/Client/core/CConnectManager.cpp +++ b/Client/core/CConnectManager.cpp @@ -145,6 +145,8 @@ bool CConnectManager::Connect(const char* szHost, unsigned short usPort, const c // Display the status box SString strBuffer(_("Connecting to %s:%u ..."), m_strHost.c_str(), m_usPort); + if (m_bReconnect) + strBuffer = SString(_("Reconnecting to %s:%u ..."), m_strHost.c_str(), m_usPort); CCore::GetSingleton().ShowMessageBox(_("CONNECTING"), strBuffer, MB_BUTTON_CANCEL | MB_ICON_INFO, m_pOnCancelClick); WriteDebugEvent(SString("Connecting to %s:%u ...", m_strHost.c_str(), m_usPort)); diff --git a/Client/core/CMainMenu.cpp b/Client/core/CMainMenu.cpp index 7d1c2740a8..1ef82a75c6 100644 --- a/Client/core/CMainMenu.cpp +++ b/Client/core/CMainMenu.cpp @@ -912,17 +912,13 @@ bool CMainMenu::OnQuickConnectButtonClick(CGUIElement* pElement, bool left) if (m_ucFade != FADE_VISIBLE) return false; - // If we're right clicking, execute special command - if (!left) + if (left) + g_pCore->GetCommands()->Execute("reconnect", ""); + else { - std::string command; - CVARS_GET("_beta_qc_rightclick_command", command); - g_pCore->GetCommands()->Execute(command.data()); - return true; + m_ServerBrowser.SetVisible(true); + m_ServerBrowser.OnQuickConnectButtonClick(); } - - m_ServerBrowser.SetVisible(true); - m_ServerBrowser.OnQuickConnectButtonClick(); return true; } diff --git a/Client/core/ServerBrowser/CServerBrowser.cpp b/Client/core/ServerBrowser/CServerBrowser.cpp index 1246276b70..2ea47cafdf 100644 --- a/Client/core/ServerBrowser/CServerBrowser.cpp +++ b/Client/core/ServerBrowser/CServerBrowser.cpp @@ -924,30 +924,6 @@ void CServerBrowser::CreateHistoryList() } } - // If we had no history, import it from our old quick connect - if (bEmpty) - { - std::string strAddress; - CVARS_GET("qc_host", strAddress); - - if (!strAddress.empty()) - { - std::string strPort; - CVARS_GET("qc_port", strPort); - - if (!strPort.empty()) - { - in_addr Address; - if (CServerListItem::Parse(strAddress.c_str(), Address)) - { - m_ServersHistory.AddUnique(Address, atoi(strPort.c_str())); - CreateHistoryList(); // Restart with our new list. - return; - } - } - } - } - m_ServersHistory.Refresh(); } @@ -2030,21 +2006,6 @@ std::string CServerBrowser::GetServerPassword(const std::string& strHost) } } } - - // If the server is the one from old quick connect, try importing the password from that - std::string strQCEndpoint; - CVARS_GET("qc_host", strQCEndpoint); - - std::string strTemp; - CVARS_GET("qc_port", strTemp); - - strQCEndpoint = strQCEndpoint + ":" + strTemp; - if (strQCEndpoint == strHost) - { - CVARS_GET("qc_password", strTemp); - return strTemp; - } - return ""; }