Added /account list command, and added jid property to accounts
This commit is contained in:
@@ -84,14 +84,28 @@ accounts_reset_login_search(void)
|
||||
void
|
||||
accounts_add_login(const char *jid, const char *altdomain)
|
||||
{
|
||||
// doesn't yet exist
|
||||
if (!g_key_file_has_group(accounts, jid)) {
|
||||
g_key_file_set_boolean(accounts, jid, "enabled", TRUE);
|
||||
g_key_file_set_string(accounts, jid, "jid", jid);
|
||||
if (altdomain != NULL) {
|
||||
g_key_file_set_string(accounts, jid, "server", altdomain);
|
||||
}
|
||||
|
||||
_save_accounts();
|
||||
|
||||
// already exists, update old style accounts
|
||||
} else {
|
||||
g_key_file_set_string(accounts, jid, "jid", jid);
|
||||
_save_accounts();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
gchar**
|
||||
accounts_get_list(void)
|
||||
{
|
||||
return g_key_file_get_groups(accounts, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user