diff --git a/.github/workflows/test-stable.yml b/.github/workflows/test-stable.yml index d123c02..837eb69 100644 --- a/.github/workflows/test-stable.yml +++ b/.github/workflows/test-stable.yml @@ -228,7 +228,7 @@ jobs: uses: actions/checkout@v3 with: path: ngircd - ref: 0714466af88d71d6c395629cd7fb624b099507d4 + ref: 3e3f6cbeceefd9357b53b27c2386bb39306ab353 repository: ngircd/ngircd - name: Build ngircd run: | diff --git a/irctest/server_tests/names.py b/irctest/server_tests/names.py index 1192c11..6cff4a3 100644 --- a/irctest/server_tests/names.py +++ b/irctest/server_tests/names.py @@ -68,6 +68,39 @@ class NamesTestCase(cases.BaseServerTestCase): """ self._testNames(symbol=True, allow_trailing_space=False) + @cases.mark_specifications("RFC2812", "Modern") + def testNames2812Secret(self): + """The symbol sent for a secret channel is `@` instead of `=`: + https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.5 + https://modern.ircdocs.horse/#rplnamreply-353 + """ + self.connectClient("nick1") + self.sendLine(1, "JOIN #chan") + # enable secret channel mode + self.sendLine(1, "MODE #chan +s") + self.getMessages(1) + self.sendLine(1, "NAMES #chan") + messages = self.getMessages(1) + self.assertMessageMatch( + messages[0], + command=RPL_NAMREPLY, + params=["nick1", "@", "#chan", StrRe("@nick1 ?")], + ) + self.assertMessageMatch( + messages[1], + command=RPL_ENDOFNAMES, + params=["nick1", "#chan", ANYSTR], + ) + + self.connectClient("nick2") + self.sendLine(2, "JOIN #chan") + namreplies = [msg for msg in self.getMessages(2) if msg.command == RPL_NAMREPLY] + self.assertNotEqual(len(namreplies), 0) + for msg in namreplies: + self.assertMessageMatch( + msg, command=RPL_NAMREPLY, params=["nick2", "@", "#chan", ANYSTR] + ) + def _testNamesMultipleChannels(self, symbol): self.connectClient("nick1") diff --git a/workflows.yml b/workflows.yml index c69ddc5..aa3e141 100644 --- a/workflows.yml +++ b/workflows.yml @@ -230,7 +230,7 @@ software: name: ngircd repository: ngircd/ngircd refs: - stable: 0714466af88d71d6c395629cd7fb624b099507d4 # two years ahead of rel-26.1 + stable: 3e3f6cbeceefd9357b53b27c2386bb39306ab353 # three years ahead of rel-26.1 release: null devel: master devel_release: null