From d2fc5d550a12a5d16548597f76b8a27c5ab0f517 Mon Sep 17 00:00:00 2001 From: RealKindOne Date: Wed, 22 Jul 2026 01:58:01 -0400 Subject: [PATCH] Apply fixes for IsParting() pull request. --- src/IRCSock.cpp | 1 - test/IRCSockTest.cpp | 5 +---- test/integration/tests/core.cpp | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp index 82a9fc3e..6b1c24c0 100644 --- a/src/IRCSock.cpp +++ b/src/IRCSock.cpp @@ -1204,7 +1204,6 @@ bool CIRCSock::OnPartMessage(CPartMessage& Message) { } if (Nick.NickEquals(GetNick())) { - if (pChan) pChan->SetParting(false); m_pNetwork->DelChan(sChan); } diff --git a/test/IRCSockTest.cpp b/test/IRCSockTest.cpp index 97b6314b..6bebe35e 100644 --- a/test/IRCSockTest.cpp +++ b/test/IRCSockTest.cpp @@ -574,9 +574,6 @@ TEST_F(IRCSockTest, PartingFlag) { CMessage serverPart(":me PART #chan"); m_pTestSock->ReadLine(serverPart.ToString()); - // IsParting() should be free - EXPECT_FALSE(m_pTestChan->IsParting()); - // Verify channel was deleted EXPECT_EQ(m_pTestNetwork->FindChan("#chan"), nullptr); } @@ -593,7 +590,7 @@ TEST_F(IRCSockTest, PartingFlagOnError) { CMessage errorMsg(":server 442 me #chan :You're not on that channel"); m_pTestSock->ReadLine(errorMsg.ToString()); - // IsParting() should be free + // IsParting() should be cleared EXPECT_FALSE(m_pTestChan->IsParting()); // Verify channel was deleted diff --git a/test/integration/tests/core.cpp b/test/integration/tests/core.cpp index 3d8f5a51..aab1cc8d 100644 --- a/test/integration/tests/core.cpp +++ b/test/integration/tests/core.cpp @@ -1368,9 +1368,7 @@ TEST_F(ZNCTest, PartWithError403) { client.ReadUntil(":nick JOIN :#test"); client.Write("PART #test"); - QByteArray partMsg; - ircd.ReadUntilAndGet("PART", partMsg); - EXPECT_THAT(partMsg.toStdString(), HasSubstr("PART #test")); + ircd.ReadUntil("PART #test"); // Server returns 403 error (ERR_NOSUCHCHANNEL) instead of confirming ircd.Write(":server 403 nick #test :No such channel");