aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-08-25 22:45:51 +0100
committerJames Booth <boothj5@gmail.com>2015-08-25 22:45:51 +0100
commitfc1ee79190e05ec7682d3a52c27075142c887445 (patch)
treee480de9200d6ed0d71cca596bdcf9af25d74e4ec /src/command
parent592a3695a573ca5e0a1fa45b79b8a0e64225f1d9 (diff)
downloadprofani-tty-fc1ee79190e05ec7682d3a52c27075142c887445.tar.gz
PGP: Show key IDs for assigned public keys
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c8
-rw-r--r--src/command/commands.c14
2 files changed, 11 insertions, 11 deletions
diff --git a/src/command/command.c b/src/command/command.c
index f6205169..95fff417 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1146,7 +1146,7 @@ static struct cmd_t command_defs[] =
CMD_SYN(
"/pgp libver",
"/pgp keys",
- "/pgp fps",
+ "/pgp contacts",
"/pgp setkey <contact> <keyid>",
"/pgp start [<contact>]",
"/pgp end",
@@ -1156,8 +1156,8 @@ static struct cmd_t command_defs[] =
"See the /account command to set your own PGP key.")
CMD_ARGS(
{ "libver", "Show which version of the libgpgme library is being used." },
- { "keys", "List all keys." },
- { "fps", "Show known fingerprints." },
+ { "keys", "List all keys known to the system." },
+ { "contacts", "Show contacts with assigned public keys." },
{ "setkey <contact> <keyid>", "Manually associate a key ID with a JID." },
{ "start [<contact>]", "Start PGP encrypted chat, current contact will be used if not specified." },
{ "end", "End PGP encrypted chat with the current recipient." },
@@ -2053,7 +2053,7 @@ cmd_init(void)
pgp_ac = autocomplete_new();
autocomplete_add(pgp_ac, "keys");
- autocomplete_add(pgp_ac, "fps");
+ autocomplete_add(pgp_ac, "contacts");
autocomplete_add(pgp_ac, "setkey");
autocomplete_add(pgp_ac, "libver");
autocomplete_add(pgp_ac, "start");
diff --git a/src/command/commands.c b/src/command/commands.c
index ad1e3ff0..5143329e 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -4270,25 +4270,25 @@ cmd_pgp(ProfWin *window, const char * const command, gchar **args)
return TRUE;
}
- if (g_strcmp0(args[0], "fps") == 0) {
+ if (g_strcmp0(args[0], "contacts") == 0) {
jabber_conn_status_t conn_status = jabber_get_connection_status();
if (conn_status != JABBER_CONNECTED) {
cons_show("You are not currently connected.");
return TRUE;
}
- GHashTable *fingerprints = p_gpg_fingerprints();
- GList *jids = g_hash_table_get_keys(fingerprints);
+ GHashTable *pubkeys = p_gpg_pubkeys();
+ GList *jids = g_hash_table_get_keys(pubkeys);
if (!jids) {
- cons_show("No PGP fingerprints available.");
+ cons_show("No contacts found with PGP public keys assigned.");
return TRUE;
}
- cons_show("Known PGP fingerprints:");
+ cons_show("Assigned PGP public keys:");
GList *curr = jids;
while (curr) {
char *jid = curr->data;
- char *fingerprint = g_hash_table_lookup(fingerprints, jid);
- cons_show(" %s: %s", jid, fingerprint);
+ char *pubkey = g_hash_table_lookup(pubkeys, jid);
+ cons_show(" %s: %s", jid, pubkey);
curr = g_list_next(curr);
}
g_list_free(jids);