瀏覽代碼

Merge pull request #1219 from slingamn/alwayson_again

fix an edge case with `/NS SASET user always-on true`
tags/v2.3.0-rc1
Shivaram Lingamneni 3 年之前
父節點
當前提交
5dd13596c4
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      irc/getters.go

+ 2
- 0
irc/getters.go 查看文件

@@ -330,6 +330,8 @@ func (client *Client) SetAccountSettings(settings AccountSettings) {
330 330
 	alwaysOn := persistenceEnabled(client.server.Config().Accounts.Multiclient.AlwaysOn, settings.AlwaysOn)
331 331
 	client.stateMutex.Lock()
332 332
 	if client.registered {
333
+		// only allow the client to become always-on if their nick equals their account name
334
+		alwaysOn = alwaysOn && client.nick == client.accountName
333 335
 		autoreplayMissedDisabled = (client.accountSettings.AutoreplayMissed && !settings.AutoreplayMissed)
334 336
 		becameAlwaysOn = (!client.alwaysOn && alwaysOn)
335 337
 		client.alwaysOn = alwaysOn

Loading…
取消
儲存