1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Merge pull request #1982 from profanity-im/fix/1976-autocon-acc

Reset autoconnect account when the account gets removed
This commit is contained in:
Michael Vetter 2024-06-20 12:45:53 +02:00 committed by GitHub
commit 534c14917a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}