diff --git a/irc/getters.go b/irc/getters.go index 2580683d..2091e4af 100644 --- a/irc/getters.go +++ b/irc/getters.go @@ -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 } diff --git a/irc/nickserv.go b/irc/nickserv.go index 50d497a3..5bf45c4b 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -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)) + } + } } }