Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into oauth.5
Browse files Browse the repository at this point in the history
  • Loading branch information
slingamn committed Feb 13, 2024
2 parents 2d09dad + 8475b62 commit 029b10a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions irc/isupport/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."
<nickname> [up to 13 parameters] <human-readable trailing>
*/
maxParameters = 13
)

// List holds a list of ISUPPORT tokens
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion irc/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "fmt"

const (
// SemVer is the semantic version of Ergo.
SemVer = "2.13.0"
SemVer = "2.14.0-unreleased"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion irctest

0 comments on commit 029b10a

Please sign in to comment.