From d0f33f8b1c9309872162760448bc0c0297a36128 Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 26 May 2008 14:56:23 +0000 Subject: [PATCH] The instructions at the end of makeconf showed a wrong port This was broken since r964 from Feb 2008. Thanks to fred for finding this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1072 726aef4b-f618-498e-8847-2d620e286838 --- znc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/znc.cpp b/znc.cpp index a668035c..87a68a8b 100644 --- a/znc.cpp +++ b/znc.cpp @@ -557,8 +557,8 @@ bool CZNC::WriteNewConfig(const CString& sConfig) { CUtils::PrintMessage(""); // Listen - unsigned int uPort = 0; - while (!CUtils::GetNumInput("What port would you like ZNC to listen on?", uPort, 1, 65535)) ; + unsigned int uListenPort = 0; + while (!CUtils::GetNumInput("What port would you like ZNC to listen on?", uListenPort, 1, 65535)) ; CString sSSL; #ifdef HAVE_LIBSSL @@ -581,7 +581,7 @@ bool CZNC::WriteNewConfig(const CString& sConfig) { sListenHost += " "; } - vsLines.push_back("Listen" + s6 + " = " + sListenHost + sSSL + CString(uPort)); + vsLines.push_back("Listen" + s6 + " = " + sListenHost + sSSL + CString(uListenPort)); // !Listen #ifdef _MODULES @@ -742,17 +742,17 @@ bool CZNC::WriteNewConfig(const CString& sConfig) { do { CString sHost, sPass; bool bSSL = false; - uPort = 0; + unsigned int uServerPort = 0; while (!CUtils::GetInput("IRC server", sHost, "", "host only") || !CServer::IsValidHostName(sHost)) ; - while (!CUtils::GetNumInput("[" + sHost + "] Port", uPort, 1, 65535, 6667)) ; + 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? (probably no)", false); #endif - vsLines.push_back("\tServer = " + sHost + ((bSSL) ? " +" : " ") + CString(uPort) + " " + sPass); + vsLines.push_back("\tServer = " + sHost + ((bSSL) ? " +" : " ") + CString(uServerPort) + " " + sPass); } while (CUtils::GetBoolInput("Would you like to add another server?", false)); vsLines.push_back(""); @@ -832,7 +832,7 @@ bool CZNC::WriteNewConfig(const CString& sConfig) { CUtils::PrintMessage("as the irc server password like so.. user:pass.", true); CUtils::PrintMessage(""); CUtils::PrintMessage("Try something like this in your IRC client...", true); - CUtils::PrintMessage("/server " + CString(uPort) + " " + sUser + ":", true); + CUtils::PrintMessage("/server " + CString(uListenPort) + " " + sUser + ":", true); CUtils::PrintMessage(""); m_LockFile.UnLock();