1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added presence.last and presence.login properties to /account rename

This commit is contained in:
James Booth 2013-01-31 01:13:53 +00:00
parent ac3987869b
commit 842f5c5f99

View File

@ -272,6 +272,18 @@ accounts_rename(const char * const account_name, const char * const new_name)
free(resource);
}
char *presence_last = g_key_file_get_string(accounts, account_name, "presence.last", NULL);
if (presence_last != NULL) {
g_key_file_set_string(accounts, new_name, "presence.last", presence_last);
free(presence_last);
}
char *presence_login = g_key_file_get_string(accounts, account_name, "presence.login", NULL);
if (presence_login != NULL) {
g_key_file_set_string(accounts, new_name, "presence.login", presence_login);
free(presence_login);
}
g_key_file_remove_group(accounts, account_name, NULL);
_save_accounts();