diff options
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 8f4e7c621e..47ef4bf077 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -126,25 +126,27 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode) { debugLogA("ConnectionFailed -> reason %d", iReason); - POPUPDATAW Popup = {}; - Popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true); - wcscpy_s(Popup.lpwzContactName, m_tszUserName); - switch (iReason) { - case LOGINERR_BADUSERID: - mir_snwprintf(Popup.lpwzText, LPGENW("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again.")); - break; - case LOGINERR_WRONGPASSWORD: - mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode); - break; - case LOGINERR_NONETWORK: - case LOGINERR_NOSERVER: - mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode); - break; - default: - mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nUnknown error during sign on: %d"), iErrorCode); - break; + if (m_bErrorPopups) { + POPUPDATAW Popup = {}; + Popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true); + wcscpy_s(Popup.lpwzContactName, m_tszUserName); + switch (iReason) { + case LOGINERR_BADUSERID: + mir_snwprintf(Popup.lpwzText, TranslateT("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again.")); + break; + case LOGINERR_WRONGPASSWORD: + mir_snwprintf(Popup.lpwzText, TranslateT("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode); + break; + case LOGINERR_NONETWORK: + case LOGINERR_NOSERVER: + mir_snwprintf(Popup.lpwzText, TranslateT("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode); + break; + default: + mir_snwprintf(Popup.lpwzText, TranslateT("Connection failed.\nUnknown error during sign on: %d"), iErrorCode); + break; + } + PUAddPopupW(&Popup); } - PUAddPopupW(&Popup); ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason); ShutdownSession(); |