From 44c3a04462350a70220f7a02bde430839368df21 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 7 Sep 2014 14:39:03 +0200 Subject: [PATCH] makeconf: one server is enough to get started Webadmin is more convenient and enabled by default since 7387f00. --- src/znc.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/znc.cpp b/src/znc.cpp index 913e0af8..27f416df 100644 --- a/src/znc.cpp +++ b/src/znc.cpp @@ -721,28 +721,22 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) { vsLines.push_back(""); CUtils::PrintMessage(""); - CUtils::PrintMessage("-- IRC Servers --"); - CUtils::PrintMessage("Only add servers from the same IRC network."); - CUtils::PrintMessage("If a server from the list can't be reached, another server will be used."); + CUtils::PrintMessage("-- IRC Server --"); CUtils::PrintMessage(""); - do { - CString sHost, sPass; - bool bSSL = false; - unsigned int uServerPort = 0; + CString sHost, sPass; + bool bSSL = false; + unsigned int uServerPort = 0; - while (!CUtils::GetInput("IRC server", sHost, "", "host only") || !CServer::IsValidHostName(sHost)) ; - while (!CUtils::GetNumInput("[" + sHost + "] Port", uServerPort, 1, 65535, 6667)) ; - CUtils::GetInput("[" + sHost + "] Password (probably empty)", sPass); + while (!CUtils::GetInput("IRC server", sHost, "", "host only") || !CServer::IsValidHostName(sHost)) ; + while (!CUtils::GetNumInput("[" + sHost + "] Port", uServerPort, 1, 65535, 6667)) ; + CUtils::GetInput("[" + sHost + "] Password (probably empty)", sPass); #ifdef HAVE_LIBSSL - bSSL = CUtils::GetBoolInput("Does this server use SSL?", uServerPort == 6697); + bSSL = CUtils::GetBoolInput("Does this server use SSL?", uServerPort == 6697); #endif - vsLines.push_back("\t\tServer = " + sHost + ((bSSL) ? " +" : " ") + CString(uServerPort) + " " + sPass); - - CUtils::PrintMessage(""); - } while (CUtils::GetBoolInput("Would you like to add another server for this IRC network?", false)); + vsLines.push_back("\t\tServer = " + sHost + ((bSSL) ? " +" : " ") + CString(uServerPort) + " " + sPass); vsLines.push_back(""); CUtils::PrintMessage("");