From f456b274b52ab19b79bf933c0e81a14b901c6d00 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 18 Jan 2014 12:23:16 +0000 Subject: [PATCH] Warn users about port 6667 in --makeconf This should decrease chance of web browsers failing to connect to ZNC --- src/znc.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/znc.cpp b/src/znc.cpp index 2e140bbc..ea07f5c7 100644 --- a/src/znc.cpp +++ b/src/znc.cpp @@ -582,7 +582,16 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) { do { bSuccess = true; - while (!CUtils::GetNumInput("What port would you like ZNC to listen on?", uListenPort, 1025, 65535)) ; + while (true) { + if (!CUtils::GetNumInput("What port would you like ZNC to listen on?", uListenPort, 1025, 65535)) { + continue; + } + if (uListenPort == 6667 && !CUtils::GetBoolInput("Warning: Some web browsers reject port 6667. If you intend to use ZNC's web interface, you might want to use another port. Proceed with port 6667 anyway?", true)) { + continue; + } + break; + } + #ifdef HAVE_LIBSSL if (CUtils::GetBoolInput("Would you like ZNC to listen using SSL?", bListenSSL)) {