diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 974427253..bdb4a4964 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: "setup go" uses: "actions/setup-go@v3" with: - go-version: "1.21" + go-version: "1.22" - name: "install python3-pytest" run: "sudo apt install -y python3-pytest" - name: "make install" diff --git a/Dockerfile b/Dockerfile index eb21904c3..83e50c572 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ## build ergo binary -FROM docker.io/golang:1.21-alpine AS build-env +FROM docker.io/golang:1.22-alpine AS build-env RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git diff --git a/go.mod b/go.mod index b00892f39..be081cb35 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ergochat/ergo -go 1.21 +go 1.22 require ( code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 diff --git a/irc/isupport/list.go b/irc/isupport/list.go index baafa146a..36b30d376 100644 --- a/irc/isupport/list.go +++ b/irc/isupport/list.go @@ -11,6 +11,12 @@ import ( const ( maxLastArgLength = 400 + + /* Modern: "As the maximum number of message parameters to any reply is 15, + the maximum number of RPL_ISUPPORT tokens that can be advertised is 13." + [up to 13 parameters] + */ + maxParameters = 13 ) // List holds a list of ISUPPORT tokens @@ -95,7 +101,7 @@ func (il *List) GetDifference(newil *List) [][]string { length += len(token) } - if len(cache) == 13 || len(token)+length >= maxLastArgLength { + if len(cache) == maxParameters || len(token)+length >= maxLastArgLength { replies = append(replies, cache) cache = make([]string, 0) length = 0 @@ -138,7 +144,7 @@ func (il *List) RegenerateCachedReply() (err error) { length += len(token) } - if len(cache) == 13 || len(token)+length >= maxLastArgLength { + if len(cache) == maxParameters || len(token)+length >= maxLastArgLength { il.CachedReply = append(il.CachedReply, cache) cache = make([]string, 0) length = 0 diff --git a/irc/version.go b/irc/version.go index 3f74041bb..5b936de2d 100644 --- a/irc/version.go +++ b/irc/version.go @@ -7,7 +7,7 @@ import "fmt" const ( // SemVer is the semantic version of Ergo. - SemVer = "2.13.0" + SemVer = "2.14.0-unreleased" ) var ( diff --git a/irctest b/irctest index df2880e37..ee6c56d84 160000 --- a/irctest +++ b/irctest @@ -1 +1 @@ -Subproject commit df2880e379866c6354fa7ce776b436a2c49c557b +Subproject commit ee6c56d84bdd3467795f97f1da2d697ad4999fbd