1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

xep-0308: only allow /correct when corrections are enabled

This commit is contained in:
Michael Vetter 2020-02-14 11:15:32 +01:00
parent c995f3150e
commit edba5c83ff

View File

@ -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);