about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-03-23 23:38:06 +0000
committerJames Booth <boothj5@gmail.com>2015-03-23 23:38:06 +0000
commit475dfebd97b8adace3ee56683b968da752a3ae02 (patch)
treedac7c25cdb51c8b562ad9543b422709cbf7a658f /src/command
parent8a5d1fef2930036d34bf02d0b15d0b6239725ffd (diff)
downloadprofani-tty-475dfebd97b8adace3ee56683b968da752a3ae02.tar.gz
Added pgpkeyid account setting, send signed presence
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c2
-rw-r--r--src/command/commands.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 820ca058..8e709601 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1369,6 +1369,7 @@ cmd_init(void)
     autocomplete_add(account_set_ac, "muc");
     autocomplete_add(account_set_ac, "nick");
     autocomplete_add(account_set_ac, "otr");
+    autocomplete_add(account_set_ac, "pgpkeyid");
 
     account_clear_ac = autocomplete_new();
     autocomplete_add(account_clear_ac, "password");
@@ -1376,6 +1377,7 @@ cmd_init(void)
     autocomplete_add(account_clear_ac, "server");
     autocomplete_add(account_clear_ac, "port");
     autocomplete_add(account_clear_ac, "otr");
+    autocomplete_add(account_clear_ac, "pgpkeyid");
 
     account_default_ac = autocomplete_new();
     autocomplete_add(account_default_ac, "set");
diff --git a/src/command/commands.c b/src/command/commands.c
index bb8c0381..0dc19e41 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -516,6 +516,10 @@ cmd_account(gchar **args, struct cmd_help_t help)
                         cons_show("Updated login status for account %s: %s", account_name, value);
                     }
                     cons_show("");
+                } else if (strcmp(property, "pgpkeyid") == 0) {
+                    accounts_set_pgp_keyid(account_name, value);
+                    cons_show("Updated PGP key ID for account %s: %s", account_name, value);
+                    cons_show("");
                 } else if (valid_resource_presence_string(property)) {
                     int intval;
                     char *err_msg = NULL;
@@ -594,6 +598,10 @@ cmd_account(gchar **args, struct cmd_help_t help)
                     accounts_clear_otr(account_name);
                     cons_show("OTR policy removed for account %s", account_name);
                     cons_show("");
+                } else if (strcmp(property, "pgpkeyid") == 0) {
+                    accounts_clear_pgp_keyid(account_name);
+                    cons_show("Removed PGP key ID for account %s", account_name);
+                    cons_show("");
                 } else {
                     cons_show("Invalid property: %s", property);
                     cons_show("");