Skip to content

Commit fe77d1c

Browse files
committed
Include Go version in version string
1 parent a5eeda0 commit fe77d1c

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.13.0 (2019-07-08)
2+
3+
* Include Go version in version string.
4+
5+
16
# 1.12.0 (2019-07-06)
27

38
* Update dependencies.

local_client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ func (c *LocalClient) registerUser() {
379379
lu.messageFromServer("002", []string{
380380
fmt.Sprintf("Your host is %s, running version %s",
381381
lu.Catbox.Config.ServerName,
382-
Version),
382+
lu.Catbox.version(),
383+
),
383384
})
384385

385386
// 003 RPL_CREATED
@@ -392,7 +393,7 @@ func (c *LocalClient) registerUser() {
392393
lu.messageFromServer("004", []string{
393394
// It seems ambiguous if these are to be separate parameters.
394395
lu.Catbox.Config.ServerName,
395-
Version,
396+
lu.Catbox.version(),
396397
// User modes we support.
397398
"ioC",
398399
// Channel modes we support.

local_user.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,8 +2094,6 @@ func (u *LocalUser) versionCommand(m irc.Message) {
20942094
// Comments are free form. But I use similar to what ratbox does. See its doc
20952095
// server-version-info.
20962096

2097-
version := fmt.Sprintf("%s.", Version)
2098-
20992097
// H HUB, M IDLE_FROM_MSG, TS supports TS, 6 TS6, o TS only
21002098
comments := fmt.Sprintf("HM TS6o %s", string(u.Catbox.Config.TS6SID))
21012099

@@ -2104,7 +2102,7 @@ func (u *LocalUser) versionCommand(m irc.Message) {
21042102
Command: "351",
21052103
Params: []string{
21062104
u.User.DisplayNick,
2107-
version,
2105+
u.Catbox.version(),
21082106
u.Catbox.Config.ServerName,
21092107
comments,
21102108
},

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010
"os/signal"
1111
"path/filepath"
12+
"runtime"
1213
"strings"
1314
"sync"
1415
"syscall"
@@ -1705,3 +1706,5 @@ func sendMessages(messages []Message) {
17051706
m.Target.maybeQueueMessage(m.Message)
17061707
}
17071708
}
1709+
1710+
func (cb *Catbox) version() string { return Version + "-" + runtime.Version() }

0 commit comments

Comments
 (0)