Add IsParting() flag to track PART commands waiting IRCd response.

Fixes potential desync where ZNC marks channel as parted before server
confirms the PART, which could cause issues if the server never replies.

Add unittests and integration tests.
This commit is contained in:
RealKindOne
2026-07-21 03:24:38 -04:00
parent 3ceae3ad26
commit a0d58c8fed
6 changed files with 154 additions and 5 deletions
+3
View File
@@ -168,6 +168,7 @@ class CChan : private CCoreTranslationMixin {
void Enable();
void IncJoinTries() { m_uJoinTries++; }
void ResetJoinTries() { m_uJoinTries = 0; }
void SetParting(bool b) { m_bParting = b; }
// !Setters
// Getters
@@ -199,6 +200,7 @@ class CChan : private CCoreTranslationMixin {
bool HasAutoClearChanBufferSet() const {
return m_bHasAutoClearChanBufferSet;
}
bool IsParting() const { return m_bParting; }
// !Getters
private:
protected:
@@ -223,6 +225,7 @@ class CChan : private CCoreTranslationMixin {
CBuffer m_Buffer;
bool m_bModeKnown;
bool m_bParting;
std::map<char, CString> m_mcsModes;
};