From b6a8cc20c243d1ef358b8d8255fc4a6a7e7b4dea Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 29 Jan 2025 01:10:33 -0500 Subject: [PATCH] add conn ID to SASL auth logline --- irc/getters.go | 7 +++++++ irc/handlers.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/irc/getters.go b/irc/getters.go index d0e08256..12839710 100644 --- a/irc/getters.go +++ b/irc/getters.go @@ -223,6 +223,13 @@ func (session *Session) SetAway(awayMessage string) (wasAway, nowAway string) { return } +func (session *Session) ConnID() string { + if session == nil { + return "*" + } + return session.connID +} + func (client *Client) autoAwayEnabledNoMutex(config *Config) bool { return client.registered && client.alwaysOn && persistenceEnabled(config.Accounts.Multiclient.AutoAway, client.accountSettings.AutoAway) diff --git a/irc/handlers.go b/irc/handlers.go index 85354a3b..88890510 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -137,7 +137,7 @@ func sendSuccessfulAccountAuth(service *ircService, client *Client, rb *Response } } - client.server.logger.Info("accounts", "client", details.nick, "logged into account", details.accountName) + client.server.logger.Info("accounts", rb.session.ConnID(), details.nick, "logged into account", details.accountName) } func (server *Server) sendLoginSnomask(nickMask, accountName string) {