From edba5c83ff0238ab71174da96c353418d5b11e67 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 14 Feb 2020 11:15:32 +0100 Subject: [PATCH] xep-0308: only allow /correct when corrections are enabled --- src/command/cmd_funcs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 40f5d8f4..93b002f4 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8691,6 +8691,11 @@ cmd_correct(ProfWin *window, const char *const command, gchar **args) return TRUE; } + if (!prefs_get_boolean(PREF_CORRECTION_ALLOW)) { + win_println(window, THEME_DEFAULT, '!', "Corrections not enabled. See /help correction."); + return TRUE; + } + if (window->type == WIN_CHAT) { ProfChatWin *chatwin = (ProfChatWin*)window; assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);