diff --git a/irc/client.go b/irc/client.go index 298bc37b..f6bca331 100644 --- a/irc/client.go +++ b/irc/client.go @@ -682,7 +682,7 @@ func (client *Client) run(session *Session) { if err == errInvalidUtf8 { invalidUtf8 = true // handle as normal, including labeling } else if err != nil { - client.server.logger.Debug("connect-ip", "read error from client", err.Error()) + client.server.logger.Debug("connect-ip", session.connID, "read error from client", err.Error()) var quitMessage string switch err { case ircreader.ErrReadQ: diff --git a/irc/nickserv.go b/irc/nickserv.go index 9a776d06..3e4637f4 100644 --- a/irc/nickserv.go +++ b/irc/nickserv.go @@ -1324,6 +1324,9 @@ func nsClientsListHandler(service *ircService, server *Server, client *Client, p if session.deviceID != "" { service.Notice(rb, fmt.Sprintf(client.t("Device ID: %s"), session.deviceID)) } + if hasPrivs { + service.Notice(rb, fmt.Sprintf(client.t("Debug log ID: %s"), session.connID)) + } service.Notice(rb, fmt.Sprintf(client.t("IP address: %s"), session.ip.String())) service.Notice(rb, fmt.Sprintf(client.t("Hostname: %s"), session.hostname)) if hasPrivs { @@ -1339,9 +1342,6 @@ func nsClientsListHandler(service *ircService, server *Server, client *Client, p service.Notice(rb, fmt.Sprintf(client.t("IRCv3 CAPs: %s"), capStr)) } } - if hasPrivs { - service.Notice(rb, fmt.Sprintf(client.t("Debug log ID: %s"), session.connID)) - } } } @@ -1686,7 +1686,10 @@ func nsPushHandler(service *ircService, server *Server, client *Client, command subscriptions := target.getPushSubscriptions() service.Notice(rb, fmt.Sprintf(client.t("Nickname %[1]s has %[2]d push subscription(s)"), target.Nick(), len(subscriptions))) for i, subscription := range subscriptions { - service.Notice(rb, fmt.Sprintf("%d: %s", i, subscription.Endpoint)) + service.Notice(rb, fmt.Sprintf(client.t("Subscription %d:"), i+1)) + service.Notice(rb, fmt.Sprintf(client.t("Endpoint: %s"), subscription.Endpoint)) + service.Notice(rb, fmt.Sprintf(client.t("Last renewal: %s"), subscription.LastRefresh.Format(time.RFC1123))) + service.Notice(rb, fmt.Sprintf(client.t("Last push: %s"), subscription.LastSuccess.Format(time.RFC1123))) } case "DELETE": if len(params) < 2 { diff --git a/irc/services.go b/irc/services.go index 7bd9c5f1..6b85f797 100644 --- a/irc/services.go +++ b/irc/services.go @@ -223,7 +223,6 @@ func serviceRunCommand(service *ircService, server *Server, client *Client, cmd return } - server.logger.Debug("services", fmt.Sprintf("Client %s ran %s command %s", client.Nick(), service.Name, commandName)) if commandName == "help" { serviceHelpHandler(service, server, client, params, rb) } else {