Don't try to join channel which ZNC is already on.

When Goguma connects to ZNC, it joins the joined channels again and
again, triggering flood protection.

Note: even with this fix, the Goguma+ZNC experience is still pretty bad
and requires doing something about repeating chat history
This commit is contained in:
Alexey Sokolov
2026-01-26 22:07:59 +00:00
parent a187ae180e
commit ad7bd6d7ee

View File

@@ -143,7 +143,7 @@ void CChan::JoinUser(const CString& sKey) {
if (!IsOn() && !sKey.empty()) {
SetKey(sKey);
}
if (m_pNetwork->IsIRCConnected()) {
if (m_pNetwork->IsIRCConnected() && !IsOn()) {
m_pNetwork->PutIRC("JOIN " + GetName() + " " + GetKey());
}
}