From cbabccc2f88c766bfba2408bf169ad336d078577 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 4 Jul 2019 06:59:08 -0400 Subject: [PATCH] fix #592 --- irc/client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/irc/client.go b/irc/client.go index b1c7fe6c..93d8a588 100644 --- a/irc/client.go +++ b/irc/client.go @@ -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 == "" {