mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 05:06:20 +00:00
implement account removal
This commit is contained in:
@@ -189,6 +189,19 @@ cmd_account(gchar **args, struct cmd_help_t help)
|
||||
cons_show("Account created.");
|
||||
cons_show("");
|
||||
}
|
||||
} else if (strcmp(command, "remove") == 0) {
|
||||
char *account_name = args[1];
|
||||
if(!account_name) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
} else {
|
||||
if(accounts_remove(account_name)){
|
||||
cons_show("Account %s removed.", account_name);
|
||||
} else {
|
||||
cons_show("Failed to remove account %s.", account_name);
|
||||
cons_show("Either the account does not exist, or an unknown error occurred.");
|
||||
}
|
||||
cons_show("");
|
||||
}
|
||||
} else if (strcmp(command, "enable") == 0) {
|
||||
char *account_name = args[1];
|
||||
if (account_name == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user