request: logging out the unreachable network (v1.7.2) #907

Open
opened 2026-10-05 04:52:11 +02:00 by adam · 2 comments
Owner

would it be possible to write out the server name which is broken? (Can't resolve server hostname; Network is unreachable)

<*status> IRC connection timed out. Reconnecting...
<*status> Disconnected from IRC. Reconnecting...
<*status> Disconnected from IRC (Can't resolve server hostname). Reconnecting...
<*status> Disconnected from IRC (Connection reset by peer). Reconnecting...
<*status> Disconnected from IRC. Reconnecting...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> IRC connection timed out. Reconnecting...
<*status> IRC connection timed out. Reconnecting...
<*status> IRC connection timed out. Reconnecting...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> IRC connection timed out. Reconnecting...
<*status> Error from server: Closing Link: xxxxxxxxxxxx (You are not authorised to use this server)
<*status> Disconnected from IRC. Reconnecting...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> IRC connection timed out. Reconnecting...
<*status> IRC connection timed out. Reconnecting...
<*status> IRC connection timed out. Reconnecting...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Error from server: Closing Link: xxxxxxxxxxxx (You are not authorised to use this server)
<*status> Disconnected from IRC. Reconnecting...
<*status> Cannot connect to IRC (Network is unreachable). Retrying...
<*status> Connected!

would it be possible to write out the server name which is broken? (Can't resolve server hostname; Network is unreachable) > <*status> IRC connection timed out. Reconnecting... <*status> Disconnected from IRC. Reconnecting... <*status> Disconnected from IRC (Can't resolve server hostname). Reconnecting... <*status> Disconnected from IRC (Connection reset by peer). Reconnecting... <*status> Disconnected from IRC. Reconnecting... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> IRC connection timed out. Reconnecting... <*status> IRC connection timed out. Reconnecting... <*status> IRC connection timed out. Reconnecting... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> IRC connection timed out. Reconnecting... <*status> Error from server: Closing Link: xxxxxxxxxxxx (You are not authorised to use this server) <*status> Disconnected from IRC. Reconnecting... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> IRC connection timed out. Reconnecting... <*status> IRC connection timed out. Reconnecting... <*status> IRC connection timed out. Reconnecting... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Error from server: Closing Link: xxxxxxxxxxxx (You are not authorised to use this server) <*status> Disconnected from IRC. Reconnecting... <*status> Cannot connect to IRC (Network is unreachable). Retrying... <*status> Connected! <!-- github-sync-id:429451677 -->
Author
Owner

Untested, but could be as simple as

--- IRCSock.cpp.orig	2019-04-05 15:54:31.212329642 +0200
+++ IRCSock.cpp	2019-04-05 15:56:08.783781336 +0200
@@ -1265,12 +1265,13 @@ void CIRCSock::SockError(int iErrno, con
 
     DEBUG(GetSockName() << " == SockError(" << iErrno << " " << sError << ")");
     if (!m_pNetwork->GetUser()->IsBeingDeleted()) {
+        CString sServer = m_pNetwork->GetCurrentServer()->GetString(false);
         if (GetConState() != CST_OK) {
             m_pNetwork->PutStatus(
-                t_f("Cannot connect to IRC ({1}). Retrying...")(sError));
+                t_f("Cannot connect to IRC (need good message {1}) ({2}). Retrying...")(sServer, sError));
         } else {
             m_pNetwork->PutStatus(
-                t_f("Disconnected from IRC ({1}). Reconnecting...")(sError));
+                t_f("Disconnected from IRC (need good message {1}) ({2}). Reconnecting...")(sServer, sError));
         }
 #ifdef HAVE_LIBSSL
         if (iErrno == errnoBadSSLCert) {
Untested, but could be as simple as ```diff --- IRCSock.cpp.orig 2019-04-05 15:54:31.212329642 +0200 +++ IRCSock.cpp 2019-04-05 15:56:08.783781336 +0200 @@ -1265,12 +1265,13 @@ void CIRCSock::SockError(int iErrno, con DEBUG(GetSockName() << " == SockError(" << iErrno << " " << sError << ")"); if (!m_pNetwork->GetUser()->IsBeingDeleted()) { + CString sServer = m_pNetwork->GetCurrentServer()->GetString(false); if (GetConState() != CST_OK) { m_pNetwork->PutStatus( - t_f("Cannot connect to IRC ({1}). Retrying...")(sError)); + t_f("Cannot connect to IRC (need good message {1}) ({2}). Retrying...")(sServer, sError)); } else { m_pNetwork->PutStatus( - t_f("Disconnected from IRC ({1}). Reconnecting...")(sError)); + t_f("Disconnected from IRC (need good message {1}) ({2}). Reconnecting...")(sServer, sError)); } #ifdef HAVE_LIBSSL if (iErrno == errnoBadSSLCert) { ``` <!-- github-comment-id:480284957 -->
Author
Owner

oh. btw v1.7.2. forgot to mention.

oh. btw v1.7.2. forgot to mention. <!-- github-comment-id:480928218 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#907