mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-15 08:29:31 +01:00
Merge pull request #1944 from slingamn/kline_snotice.1
make quit logging more consistent
This commit is contained in:
commit
8eaf6f5166
@ -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