aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-21 20:13:28 +0100
committerJames Booth <boothj5@gmail.com>2015-06-21 20:13:28 +0100
commitf81652e84eab97e555143ca436fa6bafd3d4bb80 (patch)
treee016e7ff4151c4e4a84be313993d2d3356c63b99 /src
parent566979969063cbeb1067414b745af8112d190752 (diff)
downloadprofani-tty-f81652e84eab97e555143ca436fa6bafd3d4bb80.tar.gz
Added enc_mode check when starting OTR
Diffstat (limited to 'src')
-rw-r--r--src/command/commands.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index e4d96be6..4aa0df5b 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -4403,6 +4403,11 @@ cmd_otr(ProfWin *window, gchar **args, struct cmd_help_t help)
}
ui_ev_focus_win((ProfWin*)chatwin);
+ if (chatwin->enc_mode == PROF_ENC_PGP) {
+ ui_current_print_formatted_line('!', 0, "You must disable PGP encryption before starting an OTR session.");
+ return TRUE;
+ }
+
if (chatwin->enc_mode == PROF_ENC_OTR) {
ui_current_print_formatted_line('!', 0, "You are already in an OTR session.");
return TRUE;
@@ -4431,6 +4436,11 @@ cmd_otr(ProfWin *window, gchar **args, struct cmd_help_t help)
ProfChatWin *chatwin = (ProfChatWin*)window;
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
+ if (chatwin->enc_mode == PROF_ENC_PGP) {
+ ui_current_print_formatted_line('!', 0, "You must disable PGP encryption before starting an OTR session.");
+ return TRUE;
+ }
+
if (chatwin->enc_mode == PROF_ENC_OTR) {
ui_current_print_formatted_line('!', 0, "You are already in an OTR session.");
return TRUE;