3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-11 06:29:29 +01:00

Merge pull request #1207 from slingamn/awaystring

tweaks to auto-away
This commit is contained in:
Shivaram Lingamneni 2020-07-21 23:08:50 -07:00 committed by GitHub
commit 7a16f166c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1287,11 +1287,12 @@ func (client *Client) destroy(session *Session) {
autoAway := false autoAway := false
var awayMessage string 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 autoAway = true
client.autoAway = true client.autoAway = true
client.away = 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 client.awayMessage = awayMessage
} }