From 6916dbeae07efb8a270190387b4a83eafba28af6 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 20 Jul 2020 16:58:41 -0400 Subject: [PATCH 1/2] use consistent phrase for auto-away message --- irc/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/client.go b/irc/client.go index dcdf905a..7f81adce 100644 --- a/irc/client.go +++ b/irc/client.go @@ -1291,7 +1291,7 @@ func (client *Client) destroy(session *Session) { autoAway = true client.autoAway = true client.away = true - awayMessage = config.languageManager.Translate(client.languages, `Disconnected from the server`) + awayMessage = config.languageManager.Translate(client.languages, `User is currently disconnected`) client.awayMessage = awayMessage } From eaae3165f2753a5569648697cebd8016b320d0d5 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 20 Jul 2020 17:05:29 -0400 Subject: [PATCH 2/2] don't trigger auto-away if the client is already away --- irc/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irc/client.go b/irc/client.go index 7f81adce..8a40aaf9 100644 --- a/irc/client.go +++ b/irc/client.go @@ -1287,7 +1287,8 @@ func (client *Client) destroy(session *Session) { autoAway := false var awayMessage string - if alwaysOn && remainingSessions == 0 && persistenceEnabled(config.Accounts.Multiclient.AutoAway, client.accountSettings.AutoAway) { + if alwaysOn && !client.away && remainingSessions == 0 && + persistenceEnabled(config.Accounts.Multiclient.AutoAway, client.accountSettings.AutoAway) { autoAway = true client.autoAway = true client.away = true