Share the ADMIN text and KILL reason, and test the review's gaps
check / check (push) Waiting to run

ADMIN's location and email lines come from service.AdminLines, and
KillUser applies the default reason, so both transports send the same
reply. The Disconnect test now allows a quarter of one write window,
so a Disconnect that writes before returning fails it. QueryUserMode
and UserhostReply are tested with a read that fails. The handler tests
again cover USERHOST for a nick with no session, MODE +o on your own
nick, and the status of a successful KILL. handleMode's comment says
what it does.

Model: opus-5-5
This commit is contained in:
2026-10-08 03:01:13 +00:00
parent a7faabb68f
commit c0eef92d23
8 changed files with 70 additions and 18 deletions
+4 -2
View File
@@ -37,7 +37,9 @@ func newKillVictim(t *testing.T) (*ircserver.Conn, net.Conn) {
// TestDisconnectDoesNotBlockOnUnresponsiveVictim checks
// that Disconnect returns although the victim never reads,
// so a KILL cannot stall the operator who sent it.
// so a KILL cannot stall the operator who sent it. The
// limit is well below one KillWriteWindow, so a Disconnect
// that waits on any write to the victim fails.
func TestDisconnectDoesNotBlockOnUnresponsiveVictim(
t *testing.T,
) {
@@ -53,7 +55,7 @@ func TestDisconnectDoesNotBlockOnUnresponsiveVictim(
select {
case <-returned:
case <-time.After(testTimeout):
case <-time.After(ircserver.KillWriteWindow / 4):
t.Fatal("Disconnect waited for the victim to read")
}
}