3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-11 06:29:29 +01:00

Merge pull request #1600 from slingamn/issue1576

fix #1576
This commit is contained in:
Shivaram Lingamneni 2021-03-18 04:45:11 -04:00 committed by GitHub
commit 1f2f740344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import (
"time"
"unsafe"
"github.com/oragono/oragono/irc/caps"
"github.com/oragono/oragono/irc/languages"
"github.com/oragono/oragono/irc/modes"
"github.com/oragono/oragono/irc/utils"
@ -74,6 +75,7 @@ type SessionData struct {
deviceID string
connInfo string
sessionID int64
caps []string
}
func (client *Client) AllSessionData(currentSession *Session, hasPrivs bool) (data []SessionData, currentIndex int) {
@ -102,6 +104,7 @@ func (client *Client) AllSessionData(currentSession *Session, hasPrivs bool) (da
if hasPrivs {
data[i].connInfo = utils.DescribeConn(session.socket.conn.UnderlyingConn().Conn)
}
data[i].caps = session.capabilities.Strings(caps.Cap302, nil, 300)
}
return
}

View File

@ -1140,6 +1140,11 @@ func nsClientsListHandler(service *ircService, server *Server, client *Client, p
if session.certfp != "" {
service.Notice(rb, fmt.Sprintf(client.t("Certfp: %s"), session.certfp))
}
for _, capStr := range session.caps {
if capStr != "" {
service.Notice(rb, fmt.Sprintf(client.t("IRCv3 CAPs: %s"), capStr))
}
}
}
}