about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/command/cmd_funcs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index e76831fc..040e1478 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -7671,6 +7671,18 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args)
         chatwin->is_ox = TRUE;
         win_println(window, THEME_DEFAULT, "!", "OX encryption enabled.");
         return TRUE;
+    } else if (g_strcmp0(args[0], "end") == 0) {
+        if (window->type != WIN_CHAT && args[1] == NULL) {
+            cons_show("You must be in a regular chat window to stop OX encrpytion.");
+            return TRUE;
+        }
+
+        ProfChatWin* chatwin = (ProfChatWin*)window;
+        assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
+
+        chatwin->is_ox = FALSE;
+        win_println(window, THEME_DEFAULT, "!", "OX encryption disabled.");
+        return TRUE;
     } else if (g_strcmp0(args[0], "announce") == 0) {
         if (args[1]) {
             gchar* filename = get_expanded_path(args[1]);