Browse Source

Merge remote-tracking branch 'origin/master' into oauth.5

pull/2122/head
Shivaram Lingamneni 2 months ago
parent
commit
029b10ac9c
6 changed files with 13 additions and 7 deletions
  1. 1
    1
      .github/workflows/build.yml
  2. 1
    1
      Dockerfile
  3. 1
    1
      go.mod
  4. 8
    2
      irc/isupport/list.go
  5. 1
    1
      irc/version.go
  6. 1
    1
      irctest

+ 1
- 1
.github/workflows/build.yml View File

@@ -19,7 +19,7 @@ jobs:
19 19
       - name: "setup go"
20 20
         uses: "actions/setup-go@v3"
21 21
         with:
22
-          go-version: "1.21"
22
+          go-version: "1.22"
23 23
       - name: "install python3-pytest"
24 24
         run: "sudo apt install -y python3-pytest"
25 25
       - name: "make install"

+ 1
- 1
Dockerfile View File

@@ -1,5 +1,5 @@
1 1
 ## build ergo binary
2
-FROM docker.io/golang:1.21-alpine AS build-env
2
+FROM docker.io/golang:1.22-alpine AS build-env
3 3
 
4 4
 RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git
5 5
 

+ 1
- 1
go.mod View File

@@ -1,6 +1,6 @@
1 1
 module github.com/ergochat/ergo
2 2
 
3
-go 1.21
3
+go 1.22
4 4
 
5 5
 require (
6 6
 	code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48

+ 8
- 2
irc/isupport/list.go View File

@@ -11,6 +11,12 @@ import (
11 11
 
12 12
 const (
13 13
 	maxLastArgLength = 400
14
+
15
+	/* Modern: "As the maximum number of message parameters to any reply is 15,
16
+	the maximum number of RPL_ISUPPORT tokens that can be advertised is 13."
17
+	<nickname> [up to 13 parameters] <human-readable trailing>
18
+	*/
19
+	maxParameters = 13
14 20
 )
15 21
 
16 22
 // List holds a list of ISUPPORT tokens
@@ -95,7 +101,7 @@ func (il *List) GetDifference(newil *List) [][]string {
95 101
 			length += len(token)
96 102
 		}
97 103
 
98
-		if len(cache) == 13 || len(token)+length >= maxLastArgLength {
104
+		if len(cache) == maxParameters || len(token)+length >= maxLastArgLength {
99 105
 			replies = append(replies, cache)
100 106
 			cache = make([]string, 0)
101 107
 			length = 0
@@ -138,7 +144,7 @@ func (il *List) RegenerateCachedReply() (err error) {
138 144
 			length += len(token)
139 145
 		}
140 146
 
141
-		if len(cache) == 13 || len(token)+length >= maxLastArgLength {
147
+		if len(cache) == maxParameters || len(token)+length >= maxLastArgLength {
142 148
 			il.CachedReply = append(il.CachedReply, cache)
143 149
 			cache = make([]string, 0)
144 150
 			length = 0

+ 1
- 1
irc/version.go View File

@@ -7,7 +7,7 @@ import "fmt"
7 7
 
8 8
 const (
9 9
 	// SemVer is the semantic version of Ergo.
10
-	SemVer = "2.13.0"
10
+	SemVer = "2.14.0-unreleased"
11 11
 )
12 12
 
13 13
 var (

+ 1
- 1
irctest

@@ -1 +1 @@
1
-Subproject commit df2880e379866c6354fa7ce776b436a2c49c557b
1
+Subproject commit ee6c56d84bdd3467795f97f1da2d697ad4999fbd

Loading…
Cancel
Save