diff options
author | James Booth <boothj5@gmail.com> | 2015-06-18 01:34:27 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-06-18 01:34:27 +0100 |
commit | ea99012d9bf1b8de356d3d9beb7cc45c3f456bad (patch) | |
tree | 78f31a66fcd330a30f5b262b38cb4621f509e52e /src | |
parent | 85cc5ab50deaec93f5520f3d587fba57040c2c88 (diff) | |
download | profani-tty-ea99012d9bf1b8de356d3d9beb7cc45c3f456bad.tar.gz |
Added initial /pgp start checks
Diffstat (limited to 'src')
-rw-r--r-- | src/command/commands.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index 85a85131..f40723be 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -4172,6 +4172,13 @@ cmd_pgp(ProfWin *window, gchar **args, struct cmd_help_t help) } else { cons_show("Could not get libgpgme version"); } + } else if (g_strcmp0(args[0], "start") == 0) { + jabber_conn_status_t conn_status = jabber_get_connection_status(); + if (conn_status != JABBER_CONNECTED) { + cons_show("You must be connected to start PGP encrpytion."); + } else if (window->type != WIN_CHAT && args[1] == NULL) { + cons_show("You must be in a regular chat window to start PGP encrpytion."); + } } return TRUE; |