about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 429da888..081c8f10 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -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) {