From 739d5cf87f5ef00b79afd364d53fce1f4e943760 Mon Sep 17 00:00:00 2001 From: HanzZ Date: Fri, 25 Jan 2013 12:47:41 +0100 Subject: [PATCH] Communi:Do not disconnect on error 433 --- backends/libcommuni/session.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backends/libcommuni/session.cpp b/backends/libcommuni/session.cpp index 203a748a..4f5b4cfd 100644 --- a/backends/libcommuni/session.cpp +++ b/backends/libcommuni/session.cpp @@ -276,7 +276,9 @@ void MyIrcSession::on_numericMessageReceived(IrcMessage *message) { for(AutoJoinMap::iterator it = m_autoJoin.begin(); it != m_autoJoin.end(); it++) { np->handleParticipantChanged(user, TO_UTF8(nickName()), it->second->getChannel() + suffix, pbnetwork::PARTICIPANT_FLAG_CONFLICT); } - np->handleDisconnected(user, pbnetwork::CONNECTION_ERROR_INVALID_USERNAME, "Nickname is already in use"); + if (suffix.empty()) { + np->handleDisconnected(user, pbnetwork::CONNECTION_ERROR_INVALID_USERNAME, "Nickname is already in use"); + } break; case 436: for(AutoJoinMap::iterator it = m_autoJoin.begin(); it != m_autoJoin.end(); it++) { @@ -287,7 +289,9 @@ void MyIrcSession::on_numericMessageReceived(IrcMessage *message) { for(AutoJoinMap::iterator it = m_autoJoin.begin(); it != m_autoJoin.end(); it++) { np->handleParticipantChanged(user, TO_UTF8(nickName()), it->second->getChannel() + suffix, pbnetwork::PARTICIPANT_FLAG_NOT_AUTHORIZED); } - np->handleDisconnected(user, pbnetwork::CONNECTION_ERROR_INVALID_USERNAME, "Password incorrect"); + if (suffix.empty()) { + np->handleDisconnected(user, pbnetwork::CONNECTION_ERROR_INVALID_USERNAME, "Password incorrect"); + } case 321: m_rooms.clear(); m_names.clear();