Shivaram Lingamneni 4 лет назад
Родитель
Сommit
f87b71b93f
1 измененных файлов: 5 добавлений и 0 удалений
  1. 5
    0
      irc/accounts.go

+ 5
- 0
irc/accounts.go Просмотреть файл

1174
 	var channelsStr string
1174
 	var channelsStr string
1175
 	keepProtections := false
1175
 	keepProtections := false
1176
 	am.server.store.Update(func(tx *buntdb.Tx) error {
1176
 	am.server.store.Update(func(tx *buntdb.Tx) error {
1177
+		// get the unfolded account name; for an active account, this is
1178
+		// stored under accountNameKey, for an unregistered account under unregisteredKey
1177
 		accountName, _ = tx.Get(accountNameKey)
1179
 		accountName, _ = tx.Get(accountNameKey)
1180
+		if accountName == "" {
1181
+			accountName, _ = tx.Get(unregisteredKey)
1182
+		}
1178
 		if erase {
1183
 		if erase {
1179
 			tx.Delete(unregisteredKey)
1184
 			tx.Delete(unregisteredKey)
1180
 		} else {
1185
 		} else {

Загрузка…
Отмена
Сохранить