3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00
This commit is contained in:
Shivaram Lingamneni 2019-07-04 06:59:08 -04:00
parent ab7f8de66d
commit cbabccc2f8

View File

@ -388,6 +388,7 @@ func (client *Client) run(session *Session) {
session.playResume()
session.resumeDetails = nil
client.brbTimer.Disable()
client.SetAway(false, "") // clear BRB message if any
} else {
client.playReattachMessages(session)
}
@ -1109,9 +1110,10 @@ func (client *Client) destroy(session *Session) {
if quitMessage == "" {
if !brbAt.IsZero() {
awayMessage := client.AwayMessage()
if awayMessage != "" {
quitMessage = fmt.Sprintf("%s [%s ago]", awayMessage, time.Since(brbAt).Truncate(time.Second).String())
if awayMessage == "" {
awayMessage = "Disconnected" // auto-BRB
}
quitMessage = fmt.Sprintf("%s [%s ago]", awayMessage, time.Since(brbAt).Truncate(time.Second).String())
}
}
if quitMessage == "" {