Improve the error messages we give for failed connect attempts... again

EADDRNOTAVAIL is generated for these failed vhosts instead of EDOM as it did
before. Yay for Csocket.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1367 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-02-03 18:21:33 +00:00
parent b17bfe7922
commit ba5610654b
+5 -1
View File
@@ -836,8 +836,12 @@ void CIRCSock::SockError(int iErrno) {
sError = "Your VHost could not be resolved";
} else if (iErrno == EADDRNOTAVAIL) {
// Csocket uses this if it can't resolve the dest host name
// ...but it also does generate this if bind() fails -.-
sError = strerror(iErrno);
sError += " (Is your IRC server's host name valid?)";
if (GetBindHost().empty())
sError += " (Is your IRC server's host name valid?)";
else
sError += " (Is your IRC server's host name and vhost valid?)";
} else {
sError = strerror(iErrno);
}