diff options
author | James Booth <boothj5@gmail.com> | 2013-02-18 22:07:17 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-02-18 22:07:17 +0000 |
commit | f1693278cb906a75effca482fb9bf4080df1f037 (patch) | |
tree | 80d848fb4b900725a28fa21f47253e62e05e07a7 /src/command | |
parent | 657d1d4a493a30570a657a071943fcd14c7d124c (diff) | |
download | profani-tty-f1693278cb906a75effca482fb9bf4080df1f037.tar.gz |
Colour connected account in "/account list" according ot presence
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/command/command.c b/src/command/command.c index 13eec811..0b6f5312 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1081,19 +1081,8 @@ _cmd_account(gchar **args, struct cmd_help_t help) if (strcmp(command, "list") == 0) { gchar **accounts = accounts_get_list(); - int size = g_strv_length(accounts); - - if (size > 0) { - cons_show("Accounts:"); - int i = 0; - for (i = 0; i < size; i++) { - cons_show(accounts[i]); - } - cons_show(""); - } else { - cons_show("No accounts created yet."); - cons_show(""); - } + cons_show_account_list(accounts); + g_strfreev(accounts); } else if (strcmp(command, "show") == 0) { char *account_name = args[1]; if (account_name == NULL) { |