mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 21:39:25 +01:00
make quit logging more consistent
Log it at level INFO for parity with connect / connect-ip
This commit is contained in:
parent
2a3b8e648c
commit
42883972a8
@ -1179,7 +1179,6 @@ func (client *Client) destroy(session *Session) {
|
|||||||
client.stateMutex.Lock()
|
client.stateMutex.Lock()
|
||||||
|
|
||||||
details := client.detailsNoMutex()
|
details := client.detailsNoMutex()
|
||||||
wasReattach := session != nil && session.client != client
|
|
||||||
sessionRemoved := false
|
sessionRemoved := false
|
||||||
registered := client.registered
|
registered := client.registered
|
||||||
// XXX a temporary (reattaching) client can be marked alwaysOn when it logs in,
|
// 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()
|
client.server.semaphores.ClientDestroy.Acquire()
|
||||||
defer client.server.semaphores.ClientDestroy.Release()
|
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 {
|
if registered {
|
||||||
client.server.whoWas.Append(client.WhoWas())
|
client.server.whoWas.Append(client.WhoWas())
|
||||||
}
|
}
|
||||||
@ -1347,6 +1342,7 @@ func (client *Client) destroy(session *Session) {
|
|||||||
|
|
||||||
if registered {
|
if registered {
|
||||||
client.server.snomasks.Send(sno.LocalQuits, fmt.Sprintf(ircfmt.Unescape("%s$r exited the network"), details.nick))
|
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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user