mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user