mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
commit
5cff9bb636
@ -388,6 +388,7 @@ func (client *Client) run(session *Session) {
|
|||||||
session.playResume()
|
session.playResume()
|
||||||
session.resumeDetails = nil
|
session.resumeDetails = nil
|
||||||
client.brbTimer.Disable()
|
client.brbTimer.Disable()
|
||||||
|
client.SetAway(false, "") // clear BRB message if any
|
||||||
} else {
|
} else {
|
||||||
client.playReattachMessages(session)
|
client.playReattachMessages(session)
|
||||||
}
|
}
|
||||||
@ -1109,9 +1110,10 @@ func (client *Client) destroy(session *Session) {
|
|||||||
if quitMessage == "" {
|
if quitMessage == "" {
|
||||||
if !brbAt.IsZero() {
|
if !brbAt.IsZero() {
|
||||||
awayMessage := client.AwayMessage()
|
awayMessage := client.AwayMessage()
|
||||||
if awayMessage != "" {
|
if awayMessage == "" {
|
||||||
quitMessage = fmt.Sprintf("%s [%s ago]", awayMessage, time.Since(brbAt).Truncate(time.Second).String())
|
awayMessage = "Disconnected" // auto-BRB
|
||||||
}
|
}
|
||||||
|
quitMessage = fmt.Sprintf("%s [%s ago]", awayMessage, time.Since(brbAt).Truncate(time.Second).String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if quitMessage == "" {
|
if quitMessage == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user