about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-10-23 23:12:15 +0100
committerJames Booth <boothj5@gmail.com>2014-10-23 23:12:15 +0100
commit84765969e0cab6da881dfecc6dee7de7a038f80c (patch)
treee5434aa94a7ae04902056ebcc15dbf3945954f59 /src/command
parent552d88b931341b035548923b8e099bd25741064c (diff)
downloadprofani-tty-84765969e0cab6da881dfecc6dee7de7a038f80c.tar.gz
Added /account clear [account] port
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c1
-rw-r--r--src/command/commands.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c
index b8daa7eb..b6fd572c 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1195,6 +1195,7 @@ cmd_init(void)
     account_clear_ac = autocomplete_new();
     autocomplete_add(account_clear_ac, "password");
     autocomplete_add(account_clear_ac, "server");
+    autocomplete_add(account_clear_ac, "port");
     autocomplete_add(account_clear_ac, "otr");
 
     close_ac = autocomplete_new();
diff --git a/src/command/commands.c b/src/command/commands.c
index eb361b3e..fa0a423e 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -366,6 +366,10 @@ cmd_account(gchar **args, struct cmd_help_t help)
                     accounts_clear_server(account_name);
                     cons_show("Removed server for account %s", account_name);
                     cons_show("");
+                } else if (strcmp(property, "port") == 0) {
+                    accounts_clear_port(account_name);
+                    cons_show("Removed port for account %s", account_name);
+                    cons_show("");
                 } else if (strcmp(property, "otr") == 0) {
                     accounts_clear_otr(account_name);
                     cons_show("OTR policy removed for account %s", account_name);