From 05ca849339cee7059d4d1097a45d55e209871200 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Mon, 27 Jan 2014 00:07:17 +0000 Subject: [PATCH] Don't ask if user wants to create znc.pem or not Sure they want! --- src/znc.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/znc.cpp b/src/znc.cpp index 6a043afc..9022fe68 100644 --- a/src/znc.cpp +++ b/src/znc.cpp @@ -600,19 +600,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) { #ifdef HAVE_LIBSSL - if (CUtils::GetBoolInput("Would you like ZNC to listen using SSL?", bListenSSL)) { - bListenSSL = true; - - CString sPemFile = GetPemLocation(); - if (!CFile::Exists(sPemFile)) { - CUtils::PrintError("Unable to locate pem file: [" + sPemFile + "]"); - if (CUtils::GetBoolInput("Would you like to create a new pem file now?", - true)) { - WritePemFile(); - } - } - } else - bListenSSL = false; + bListenSSL = CUtils::GetBoolInput("Would you like ZNC to listen using SSL?", bListenSSL); #endif #ifdef HAVE_IPV6 @@ -632,6 +620,14 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) { delete pListener; } while (!bSuccess); +#ifdef HAVE_LIBSSL + CString sPemFile = GetPemLocation(); + if (!CFile::Exists(sPemFile)) { + CUtils::PrintMessage("Unable to locate pem file: [" + sPemFile + "], creating it"); + WritePemFile(); + } +#endif + vsLines.push_back(""); vsLines.push_back("\tPort = " + CString(uListenPort)); vsLines.push_back("\tIPv4 = true");