diff options
author | DebXWoody <stefan@debxwoody.de> | 2021-06-28 21:28:58 +0200 |
---|---|---|
committer | DebXWoody <stefan@debxwoody.de> | 2021-06-28 21:28:58 +0200 |
commit | 2a011e69acb97ba6e794f970c5d67a9e4b348bd7 (patch) | |
tree | f83558162e5e5a2f79064a70d61173497e29d7c8 /src/command/cmd_funcs.c | |
parent | 49a0d97a433da21fa6cd3c85401f76523471c115 (diff) | |
download | profani-tty-2a011e69acb97ba6e794f970c5d67a9e4b348bd7.tar.gz |
Bugfixes for OX implementation
* autocomplete for /ox discover * fixed help description * Implemented /ox char command * Validated KeyID length
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index e1108982..185c55a0 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -7453,6 +7453,22 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args) return TRUE; } + if (strcmp(args[0], "char") == 0) { + if (args[1] == NULL) { + cons_bad_cmd_usage(command); + return TRUE; + } else if (g_utf8_strlen(args[1], 4) == 1) { + if (prefs_set_ox_char(args[1])) { + cons_show("OX char set to %s.", args[1]); + } else { + cons_show_error("Could not set OX char: %s.", args[1]); + } + return TRUE; + } + cons_bad_cmd_usage(command); + return TRUE; + } + // The '/ox keys' command - same like in pgp // Should we move this to a common command // e.g. '/openpgp keys'?. @@ -7597,13 +7613,13 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args) if (args[1]) { ox_discover_public_key(args[1]); } else { - cons_show("JID is required"); + cons_show("To discover the OpenPGP keys of an user, the JID is required"); } } else if (g_strcmp0(args[0], "request") == 0) { if (args[1] && args[2]) { ox_request_public_key(args[1], args[2]); } else { - cons_show("JID and Fingerprint is required"); + cons_show("JID and KeyID is required"); } } else { cons_show("OX not implemented"); |