Skip to content
Browse files

Warn users about port 6667 in --makeconf

This should decrease chance of web browsers failing to connect to ZNC

(cherry picked from commit f456b27)
  • Loading branch information...
1 parent f0e0708 commit 934e6104c7f0b9eec88880fd2efd52575a591a92 @DarthGandalf DarthGandalf committed
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/znc.cpp
View
11 src/znc.cpp
@@ -578,7 +578,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)) {

0 comments on commit 934e610

Please sign in to comment.
Something went wrong with that request. Please try again.