diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-14 11:15:32 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-14 11:18:16 +0100 |
commit | edba5c83ff0238ab71174da96c353418d5b11e67 (patch) | |
tree | 4d8518464a8a8eaaf1b5a0ff76c7e3bd3336708d /src/command | |
parent | c995f3150e8582907c749968e2c0c8b1022a43c1 (diff) | |
download | profani-tty-edba5c83ff0238ab71174da96c353418d5b11e67.tar.gz |
xep-0308: only allow /correct when corrections are enabled
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_funcs.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |