From 42883972a85e16a319096818960de298b1302e08 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 28 Apr 2022 12:32:01 -0400 Subject: [PATCH] make quit logging more consistent Log it at level INFO for parity with connect / connect-ip --- irc/client.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/irc/client.go b/irc/client.go index fd1b4004..d0deb063 100644 --- a/irc/client.go +++ b/irc/client.go @@ -1179,7 +1179,6 @@ func (client *Client) destroy(session *Session) { client.stateMutex.Lock() details := client.detailsNoMutex() - wasReattach := session != nil && session.client != client sessionRemoved := false registered := client.registered // XXX a temporary (reattaching) client can be marked alwaysOn when it logs in, @@ -1294,10 +1293,6 @@ func (client *Client) destroy(session *Session) { client.server.semaphores.ClientDestroy.Acquire() defer client.server.semaphores.ClientDestroy.Release() - if !wasReattach { - client.server.logger.Debug("quit", fmt.Sprintf("%s is no longer on the server", details.nick)) - } - if registered { client.server.whoWas.Append(client.WhoWas()) } @@ -1347,6 +1342,7 @@ func (client *Client) destroy(session *Session) { if registered { client.server.snomasks.Send(sno.LocalQuits, fmt.Sprintf(ircfmt.Unescape("%s$r exited the network"), details.nick)) + client.server.logger.Info("quit", fmt.Sprintf("%s is no longer on the server", details.nick)) } }