mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-11 06:29:29 +01:00
Merge pull request #1219 from slingamn/alwayson_again
fix an edge case with `/NS SASET user always-on true`
This commit is contained in:
commit
5dd13596c4
@ -330,6 +330,8 @@ func (client *Client) SetAccountSettings(settings AccountSettings) {
|
||||
alwaysOn := persistenceEnabled(client.server.Config().Accounts.Multiclient.AlwaysOn, settings.AlwaysOn)
|
||||
client.stateMutex.Lock()
|
||||
if client.registered {
|
||||
// only allow the client to become always-on if their nick equals their account name
|
||||
alwaysOn = alwaysOn && client.nick == client.accountName
|
||||
autoreplayMissedDisabled = (client.accountSettings.AutoreplayMissed && !settings.AutoreplayMissed)
|
||||
becameAlwaysOn = (!client.alwaysOn && alwaysOn)
|
||||
client.alwaysOn = alwaysOn
|
||||
|
Loading…
Reference in New Issue
Block a user