Re-vendor the canonical files from sneak/prompts at dd4027b (closes #112)
check / check (push) Waiting to run
check / check (push) Waiting to run
The shared files are fetched from sneak/prompts dd4027b, with this repository's own entries after the shared content in .gitignore, .editorconfig and .dockerignore. Lint and tests are Dockerfile phases (golangci-lint v2.14.0, Debian Go 1.24.13) that the build stage depends on, and the Makefile targets call the script/ entrypoints. make fmt also formats Markdown with prettier. Fixes for the new lint findings: the auth cookie is always Secure, an IRC connection's relay goroutine stops when the connection closes, and repeated strings are constants. neoirc-cli treats a plain-HTTP server on localhost or a loopback address as secure, so local use keeps its session. Whether the 60-second test cap covers building the test phase is open on sneak/prompts issue 113. Model: opus-5-5
This commit was merged in pull request #115.
This commit is contained in:
@@ -159,9 +159,7 @@ func (c *Conn) handleJoin(
|
||||
return
|
||||
}
|
||||
|
||||
channels := strings.Split(msg.Params[0], ",")
|
||||
|
||||
for _, chanName := range channels {
|
||||
for chanName := range strings.SplitSeq(msg.Params[0], ",") {
|
||||
chanName = strings.TrimSpace(chanName)
|
||||
|
||||
if !strings.HasPrefix(chanName, "#") {
|
||||
@@ -305,9 +303,7 @@ func (c *Conn) handlePart(
|
||||
reason = msg.Params[1]
|
||||
}
|
||||
|
||||
channels := strings.Split(msg.Params[0], ",")
|
||||
|
||||
for _, ch := range channels {
|
||||
for ch := range strings.SplitSeq(msg.Params[0], ",") {
|
||||
ch = strings.TrimSpace(ch)
|
||||
c.partChannel(ctx, ch, reason)
|
||||
}
|
||||
@@ -619,8 +615,8 @@ func (c *Conn) applyChannelModes(
|
||||
) {
|
||||
adding := true
|
||||
argIdx := 0
|
||||
applied := ""
|
||||
appliedArgs := ""
|
||||
|
||||
var applied, appliedArgs strings.Builder
|
||||
|
||||
for _, modeChar := range modeStr {
|
||||
var res modeResult
|
||||
@@ -672,16 +668,13 @@ func (c *Conn) applyChannelModes(
|
||||
argIdx += res.consumed
|
||||
|
||||
if !res.skip {
|
||||
applied += res.applied
|
||||
appliedArgs += res.appliedArgs
|
||||
applied.WriteString(res.applied)
|
||||
appliedArgs.WriteString(res.appliedArgs)
|
||||
}
|
||||
}
|
||||
|
||||
if applied != "" {
|
||||
modeReply := applied
|
||||
if appliedArgs != "" {
|
||||
modeReply += appliedArgs
|
||||
}
|
||||
if applied.Len() > 0 {
|
||||
modeReply := applied.String() + appliedArgs.String()
|
||||
|
||||
c.send(FormatMessage(
|
||||
c.hostmask(), "MODE", channel, modeReply,
|
||||
|
||||
Reference in New Issue
Block a user