Don't forward client JOINs during registration

ZNC remembers that it should join these channels, and will join them after registration. But if client automatically joins some channels, we don't want it to be added to send queue before parts of registration itself (CAP, AUTHENTICATE), because server will just disconnect with "Registration timeout". After registration is complete, using /join still joins the channel immediately.

Only limiting this to joins, because server may request some input from user to finish registration, and joins are the ones which are prone to be sent automatically by client to cause issues.

Fix #1949
This commit is contained in:
Alexey Sokolov
2025-05-10 19:56:23 +01:00
parent 8dab274ed8
commit 3d1551b7f2
3 changed files with 22 additions and 6 deletions

View File

@@ -1477,13 +1477,13 @@ bool CClient::OnJoinMessage(CJoinMessage& Message) {
pChan->SetKey(sKey);
}
}
}
if (!sChannel.empty()) {
sChans += (sChans.empty()) ? sChannel : CString("," + sChannel);
if (!sChannel.empty() && m_pNetwork->IsIRCConnected()) {
sChans += (sChans.empty()) ? sChannel : CString("," + sChannel);
if (!vsKeys.empty()) {
sKeys += (sKeys.empty()) ? sKey : CString("," + sKey);
if (!vsKeys.empty()) {
sKeys += (sKeys.empty()) ? sKey : CString("," + sKey);
}
}
}
}