From ea99012d9bf1b8de356d3d9beb7cc45c3f456bad Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 18 Jun 2015 01:34:27 +0100 Subject: Added initial /pgp start checks --- src/command/commands.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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; -- cgit