Skip to content

Commit

Permalink
Merge pull request #1982 from profanity-im/fix/1976-autocon-acc
Browse files Browse the repository at this point in the history
Reset autoconnect account when the account gets removed
  • Loading branch information
jubalh authored Jun 20, 2024
2 parents 07900e9 + 5765edb commit 534c149
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/command/cmd_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,12 @@ cmd_account_remove(ProfWin* window, const char* const command, gchar** args)
}
cons_show("");

auto_gchar gchar* autocon_account = prefs_get_string(PREF_CONNECT_ACCOUNT);
if (g_strcmp0(account_name, autocon_account) == 0) {
prefs_set_string(PREF_CONNECT_ACCOUNT, NULL);
cons_show("Autoconnect account reset because the corresponding account was removed.");
}

return TRUE;
}

Expand Down

0 comments on commit 534c149

Please sign in to comment.