about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorWilliam Wennerström <william@wstrm.dev>2020-06-28 15:26:13 +0200
committerWilliam Wennerström <william@wstrm.dev>2020-11-16 21:58:08 +0100
commit9d58472c8cb4dd9fffc5620cae681c064e32f7bb (patch)
treee49c4c44fe74bbd578b2725869f9aef8edec8338 /src
parentf4ab1ca9e75bbc635781c795089bf669ee08942d (diff)
downloadprofani-tty-9d58472c8cb4dd9fffc5620cae681c064e32f7bb.tar.gz
Remove /omemo sendfile
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_ac.c13
-rw-r--r--src/command/cmd_defs.c95
-rw-r--r--src/command/cmd_funcs.c17
-rw-r--r--src/command/cmd_funcs.h256
-rw-r--r--src/config/preferences.c779
-rw-r--r--src/config/preferences.h1
-rw-r--r--src/ui/console.c8
7 files changed, 566 insertions, 603 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index 3aeedc60..f7414bad 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -193,7 +193,6 @@ static Autocomplete otr_sendfile_ac;
 static Autocomplete omemo_ac;
 static Autocomplete omemo_log_ac;
 static Autocomplete omemo_policy_ac;
-static Autocomplete omemo_sendfile_ac;
 #endif
 static Autocomplete connect_property_ac;
 static Autocomplete tls_property_ac;
@@ -683,7 +682,6 @@ cmd_ac_init(void)
     autocomplete_add(omemo_ac, "clear_device_list");
     autocomplete_add(omemo_ac, "policy");
     autocomplete_add(omemo_ac, "char");
-    autocomplete_add(omemo_ac, "sendfile");
 
     omemo_log_ac = autocomplete_new();
     autocomplete_add(omemo_log_ac, "on");
@@ -694,10 +692,6 @@ cmd_ac_init(void)
     autocomplete_add(omemo_policy_ac, "manual");
     autocomplete_add(omemo_policy_ac, "automatic");
     autocomplete_add(omemo_policy_ac, "always");
-
-    omemo_sendfile_ac = autocomplete_new();
-    autocomplete_add(omemo_sendfile_ac, "on");
-    autocomplete_add(omemo_sendfile_ac, "off");
 #endif
 
     connect_property_ac = autocomplete_new();
@@ -1292,7 +1286,6 @@ cmd_ac_reset(ProfWin* window)
     autocomplete_reset(omemo_ac);
     autocomplete_reset(omemo_log_ac);
     autocomplete_reset(omemo_policy_ac);
-    autocomplete_reset(omemo_sendfile_ac);
 #endif
     autocomplete_reset(connect_property_ac);
     autocomplete_reset(tls_property_ac);
@@ -1450,7 +1443,6 @@ cmd_ac_uninit(void)
     autocomplete_free(omemo_ac);
     autocomplete_free(omemo_log_ac);
     autocomplete_free(omemo_policy_ac);
-    autocomplete_free(omemo_sendfile_ac);
 #endif
     autocomplete_free(connect_property_ac);
     autocomplete_free(tls_property_ac);
@@ -2510,11 +2502,6 @@ _omemo_autocomplete(ProfWin* window, const char* const input, gboolean previous)
         return found;
     }
 
-    found = autocomplete_param_with_ac(input, "/omemo sendfile", omemo_sendfile_ac, TRUE, previous);
-    if (found) {
-        return found;
-    }
-
     jabber_conn_status_t conn_status = connection_get_status();
 
     if (conn_status == JABBER_CONNECTED) {
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index 53c42bae..d291856c 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -2274,55 +2274,52 @@ static struct cmd_t command_defs[] = {
     },
 
     { "/omemo",
-      parse_args, 1, 3, NULL,
-      CMD_SUBFUNCS(
-              { "gen", cmd_omemo_gen },
-              { "log", cmd_omemo_log },
-              { "start", cmd_omemo_start },
-              { "end", cmd_omemo_end },
-              { "trust", cmd_omemo_trust },
-              { "untrust", cmd_omemo_untrust },
-              { "fingerprint", cmd_omemo_fingerprint },
-              { "char", cmd_omemo_char },
-              { "policy", cmd_omemo_policy },
-              { "clear_device_list", cmd_omemo_clear_device_list },
-              { "sendfile", cmd_omemo_sendfile })
-      CMD_NOMAINFUNC
-      CMD_TAGS(
-              CMD_TAG_CHAT,
-              CMD_TAG_UI)
-      CMD_SYN(
-              "/omemo gen",
-              "/omemo log on|off|redact",
-              "/omemo start [<contact>]",
-              "/omemo trust [<contact>] <fingerprint>",
-              "/omemo end",
-              "/omemo fingerprint [<contact>]",
-              "/omemo char <char>",
-              "/omemo policy manual|automatic|always",
-              "/omemo sendfile on|off",
-              "/omemo clear_device_list")
-      CMD_DESC(
-              "OMEMO commands to manage keys, and perform encryption during chat sessions.")
-      CMD_ARGS(
-              { "gen", "Generate OMEMO crytographic materials for current account." },
-              { "start [<contact>]", "Start an OMEMO session with contact, or current recipient if omitted." },
-              { "end", "End the current OMEMO session." },
-              { "log on|off", "Enable or disable plaintext logging of OMEMO encrypted messages." },
-              { "log redact", "Log OMEMO encrypted messages, but replace the contents with [redacted]. This is the default." },
-              { "fingerprint [<contact>]", "Show contact fingerprints, or current recipient if omitted." },
-              { "char <char>", "Set the character to be displayed next to OMEMO encrypted messages." },
-              { "policy manual", "Set the global OMEMO policy to manual, OMEMO sessions must be started manually." },
-              { "policy automatic", "Set the global OMEMO policy to opportunistic, an OMEMO session will be attempted upon starting a conversation." },
-              { "policy always", "Set the global OMEMO policy to always, an error will be displayed if an OMEMO session cannot be initiated upon starting a conversation." },
-              { "sendfile on|off", "Allow /sendfile to send unencrypted files while in an OMEMO session." },
-              { "clear_device_list", "Clear your own device list on server side. Each client will reannounce itself when connected back." })
-      CMD_EXAMPLES(
-              "/omemo gen",
-              "/omemo start odin@valhalla.edda",
-              "/omemo trust c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
-              "/omemo untrust loki@valhalla.edda c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
-              "/omemo char *")
+        parse_args, 1, 3, NULL,
+        CMD_SUBFUNCS(
+            { "gen", cmd_omemo_gen },
+            { "log", cmd_omemo_log },
+            { "start", cmd_omemo_start },
+            { "end", cmd_omemo_end },
+            { "trust", cmd_omemo_trust },
+            { "untrust", cmd_omemo_untrust },
+            { "fingerprint", cmd_omemo_fingerprint },
+            { "char", cmd_omemo_char },
+            { "policy", cmd_omemo_policy },
+            { "clear_device_list", cmd_omemo_clear_device_list })
+        CMD_NOMAINFUNC
+        CMD_TAGS(
+            CMD_TAG_CHAT,
+            CMD_TAG_UI)
+        CMD_SYN(
+            "/omemo gen",
+            "/omemo log on|off|redact",
+            "/omemo start [<contact>]",
+            "/omemo trust [<contact>] <fingerprint>",
+            "/omemo end",
+            "/omemo fingerprint [<contact>]",
+            "/omemo char <char>",
+            "/omemo policy manual|automatic|always",
+            "/omemo clear_device_list")
+        CMD_DESC(
+            "OMEMO commands to manage keys, and perform encryption during chat sessions.")
+        CMD_ARGS(
+            { "gen",                     "Generate OMEMO crytographic materials for current account." },
+            { "start [<contact>]",       "Start an OMEMO session with contact, or current recipient if omitted." },
+            { "end",                     "End the current OMEMO session." },
+            { "log on|off",              "Enable or disable plaintext logging of OMEMO encrypted messages." },
+            { "log redact",              "Log OMEMO encrypted messages, but replace the contents with [redacted]. This is the default." },
+            { "fingerprint [<contact>]", "Show contact fingerprints, or current recipient if omitted." },
+            { "char <char>",             "Set the character to be displayed next to OMEMO encrypted messages." },
+            { "policy manual",           "Set the global OMEMO policy to manual, OMEMO sessions must be started manually." },
+            { "policy automatic",        "Set the global OMEMO policy to opportunistic, an OMEMO session will be attempted upon starting a conversation." },
+            { "policy always",           "Set the global OMEMO policy to always, an error will be displayed if an OMEMO session cannot be initiated upon starting a conversation." },
+            { "clear_device_list",       "Clear your own device list on server side. Each client will reannounce itself when connected back."})
+        CMD_EXAMPLES(
+            "/omemo gen",
+            "/omemo start odin@valhalla.edda",
+            "/omemo trust c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
+            "/omemo untrust loki@valhalla.edda c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
+            "/omemo char *")
     },
 
     { "/save",
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 25d21264..113192cc 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -4858,7 +4858,7 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args)
             assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
 
 #ifdef HAVE_OMEMO
-            if (chatwin->is_omemo && !prefs_get_boolean(PREF_OMEMO_SENDFILE)) {
+            if (chatwin->is_omemo) {
 
                 // Create temporary file for writing ciphertext.
                 int tmpfd;
@@ -8832,20 +8832,7 @@ cmd_omemo_policy(ProfWin* window, const char* const command, gchar** args)
 }
 
 gboolean
-cmd_omemo_sendfile(ProfWin* window, const char* const command, gchar** args)
-{
-#ifdef HAVE_OMEMO
-    _cmd_set_boolean_preference(args[1], command, "Sending unencrypted files in an OMEMO session via /sendfile", PREF_OMEMO_SENDFILE);
-
-    return TRUE;
-#else
-    cons_show("This version of Profanity has not been built with OMEMO support enabled");
-    return TRUE;
-#endif
-}
-
-gboolean
-cmd_save(ProfWin* window, const char* const command, gchar** args)
+cmd_save(ProfWin *window, const char *const command, gchar **args)
 {
     log_info("Saving preferences to configuration file");
     cons_show("Saving preferences.");
diff --git a/src/command/cmd_funcs.h b/src/command/cmd_funcs.h
index 92c81364..f6fac7ca 100644
--- a/src/command/cmd_funcs.h
+++ b/src/command/cmd_funcs.h
@@ -111,133 +111,133 @@ gboolean cmd_pgp(ProfWin* window, const char* const command, gchar** args);
 #ifdef HAVE_LIBGPGME
 gboolean cmd_ox(ProfWin* window, const char* const command, gchar** args);
 #endif // HAVE_LIBGPGME
-gboolean cmd_outtype(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_prefs(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_priority(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_quit(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_reconnect(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_room(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_rooms(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_bookmark(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_bookmark_ignore(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_roster(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_software(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_splash(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_states(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_status_get(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_status_set(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_sub(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_theme(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_wintitle(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_vercheck(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_who(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_win(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_alias(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_xmlconsole(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_ping(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_form(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_occupants(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_kick(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_ban(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_subject(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_affiliation(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_role(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_privileges(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_presence(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_wrap(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_time(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_resource(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_inpblock(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_titlebar(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_titlebar_show_hide(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_mainwin(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_statusbar(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_inputwin(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_script(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_export(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_charset(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_console(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_command_list(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_command_exec(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_plugins(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_sourcepath(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_install(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_update(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_uninstall(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_load(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_unload(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_reload(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_plugins_python_version(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_blocked(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_account(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_list(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_show(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_add(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_remove(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_enable(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_disable(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_rename(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_default(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_set(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_account_clear(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_tls_certpath(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_tls_trust(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_tls_trusted(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_tls_revoke(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_tls_cert(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_otr_char(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_log(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_libver(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_policy(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_gen(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_myfp(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_theirfp(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_start(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_end(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_trust(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_untrust(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_secret(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_question(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_answer(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_otr_sendfile(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_wins(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_wins_unread(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_wins_prune(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_wins_swap(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_form_field(ProfWin* window, char* tag, gchar** args);
-
-gboolean cmd_omemo_gen(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_char(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_log(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_start(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_end(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_fingerprint(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_trust(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_untrust(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_policy(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_clear_device_list(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_omemo_sendfile(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_save(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_reload(ProfWin* window, const char* const command, gchar** args);
-
-gboolean cmd_paste(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_color(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_avatar(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_os(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_correction(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_correct(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_slashguard(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_serversoftware(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_url_open(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_url_save(ProfWin* window, const char* const command, gchar** args);
-gboolean cmd_executable(ProfWin* window, const char* const command, gchar** args);
+gboolean cmd_outtype(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_prefs(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_priority(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_quit(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_reconnect(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_room(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_rooms(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_bookmark(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_bookmark_ignore(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_roster(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_software(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_splash(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_states(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_status_get(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_status_set(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_sub(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_theme(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_tiny(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_wintitle(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_vercheck(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_who(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_win(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_alias(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_xmlconsole(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_ping(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_form(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_occupants(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_kick(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_ban(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_subject(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_affiliation(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_role(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_privileges(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_presence(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_wrap(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_time(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_resource(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_inpblock(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_titlebar(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_mainwin(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_statusbar(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_inputwin(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_script(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_export(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_charset(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_console(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_command_list(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_command_exec(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_plugins(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_sourcepath(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_install(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_update(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_uninstall(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_load(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_unload(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_reload(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_plugins_python_version(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_blocked(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_account(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_list(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_show(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_add(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_remove(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_enable(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_disable(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_rename(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_default(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_set(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_account_clear(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_tls_certpath(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_tls_trust(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_tls_trusted(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_tls_revoke(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_tls_cert(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_otr_char(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_log(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_libver(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_policy(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_gen(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_myfp(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_theirfp(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_start(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_end(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_trust(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_untrust(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_secret(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_question(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_answer(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_otr_sendfile(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_wins(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_wins_unread(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_wins_prune(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_wins_swap(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_form_field(ProfWin *window, char *tag, gchar **args);
+
+gboolean cmd_omemo_gen(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_char(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_log(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_start(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_end(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_fingerprint(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_trust(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_untrust(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_policy(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_omemo_clear_device_list(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_save(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_reload(ProfWin *window, const char *const command, gchar **args);
+
+gboolean cmd_paste(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_color(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_avatar(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_os(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_correction(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_correct(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_slashguard(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_serversoftware(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_url_open(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_url_save(ProfWin *window, const char *const command, gchar **args);
+gboolean cmd_executable(ProfWin *window, const char *const command, gchar **args);
 
 #endif
diff --git a/src/config/preferences.c b/src/config/preferences.c
index e4aebdb5..e1ff4a06 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1790,145 +1790,145 @@ _save_prefs(void)
 static const char*
 _get_group(preference_t pref)
 {
-    switch (pref) {
-    case PREF_CLEAR_PERSIST_HISTORY:
-    case PREF_SPLASH:
-    case PREF_BEEP:
-    case PREF_THEME:
-    case PREF_VERCHECK:
-    case PREF_WINTITLE_SHOW:
-    case PREF_WINTITLE_GOODBYE:
-    case PREF_FLASH:
-    case PREF_INTYPE:
-    case PREF_HISTORY:
-    case PREF_OCCUPANTS:
-    case PREF_OCCUPANTS_JID:
-    case PREF_OCCUPANTS_WRAP:
-    case PREF_STATUSES:
-    case PREF_STATUSES_CONSOLE:
-    case PREF_STATUSES_CHAT:
-    case PREF_STATUSES_MUC:
-    case PREF_MUC_PRIVILEGES:
-    case PREF_PRESENCE:
-    case PREF_WRAP:
-    case PREF_TIME_CONSOLE:
-    case PREF_TIME_CHAT:
-    case PREF_TIME_MUC:
-    case PREF_TIME_CONFIG:
-    case PREF_TIME_PRIVATE:
-    case PREF_TIME_XMLCONSOLE:
-    case PREF_TIME_STATUSBAR:
-    case PREF_TIME_LASTACTIVITY:
-    case PREF_ROSTER:
-    case PREF_ROSTER_OFFLINE:
-    case PREF_ROSTER_RESOURCE:
-    case PREF_ROSTER_PRESENCE:
-    case PREF_ROSTER_STATUS:
-    case PREF_ROSTER_EMPTY:
-    case PREF_ROSTER_BY:
-    case PREF_ROSTER_ORDER:
-    case PREF_ROSTER_UNREAD:
-    case PREF_ROSTER_COUNT:
-    case PREF_ROSTER_COUNT_ZERO:
-    case PREF_ROSTER_PRIORITY:
-    case PREF_ROSTER_WRAP:
-    case PREF_ROSTER_RESOURCE_JOIN:
-    case PREF_ROSTER_CONTACTS:
-    case PREF_ROSTER_UNSUBSCRIBED:
-    case PREF_ROSTER_ROOMS:
-    case PREF_ROSTER_ROOMS_POS:
-    case PREF_ROSTER_ROOMS_BY:
-    case PREF_ROSTER_ROOMS_ORDER:
-    case PREF_ROSTER_ROOMS_UNREAD:
-    case PREF_ROSTER_ROOMS_SERVER:
-    case PREF_ROSTER_ROOMS_USE_AS_NAME:
-    case PREF_ROSTER_PRIVATE:
-    case PREF_RESOURCE_TITLE:
-    case PREF_RESOURCE_MESSAGE:
-    case PREF_ENC_WARN:
-    case PREF_INPBLOCK_DYNAMIC:
-    case PREF_TLS_SHOW:
-    case PREF_CONSOLE_MUC:
-    case PREF_CONSOLE_PRIVATE:
-    case PREF_CONSOLE_CHAT:
-    case PREF_COLOR_NICK:
-    case PREF_COLOR_NICK_OWN:
-    case PREF_ROSTER_COLOR_NICK:
-    case PREF_OCCUPANTS_COLOR_NICK:
-    case PREF_STATUSBAR_SHOW_NAME:
-    case PREF_STATUSBAR_SHOW_NUMBER:
-    case PREF_STATUSBAR_SHOW_READ:
-    case PREF_STATUSBAR_SELF:
-    case PREF_STATUSBAR_CHAT:
-    case PREF_STATUSBAR_ROOM:
-    case PREF_TITLEBAR_MUC_TITLE_JID:
-    case PREF_TITLEBAR_MUC_TITLE_NAME:
-    case PREF_SLASH_GUARD:
-        return PREF_GROUP_UI;
-    case PREF_STATES:
-    case PREF_OUTTYPE:
-        return PREF_GROUP_CHATSTATES;
-    case PREF_NOTIFY_TYPING:
-    case PREF_NOTIFY_TYPING_CURRENT:
-    case PREF_NOTIFY_CHAT:
-    case PREF_NOTIFY_CHAT_CURRENT:
-    case PREF_NOTIFY_CHAT_TEXT:
-    case PREF_NOTIFY_ROOM:
-    case PREF_NOTIFY_ROOM_MENTION:
-    case PREF_NOTIFY_ROOM_TRIGGER:
-    case PREF_NOTIFY_ROOM_CURRENT:
-    case PREF_NOTIFY_ROOM_TEXT:
-    case PREF_NOTIFY_INVITE:
-    case PREF_NOTIFY_SUB:
-    case PREF_NOTIFY_MENTION_CASE_SENSITIVE:
-    case PREF_NOTIFY_MENTION_WHOLE_WORD:
-    case PREF_TRAY:
-    case PREF_TRAY_READ:
-    case PREF_ADV_NOTIFY_DISCO_OR_VERSION:
-        return PREF_GROUP_NOTIFICATIONS;
-    case PREF_CHLOG:
-    case PREF_GRLOG:
-    case PREF_LOG_ROTATE:
-    case PREF_LOG_SHARED:
-        return PREF_GROUP_LOGGING;
-    case PREF_AVATAR_CMD:
-    case PREF_URL_OPEN_CMD:
-    case PREF_URL_SAVE_CMD:
-        return PREF_GROUP_EXECUTABLES;
-    case PREF_AUTOAWAY_CHECK:
-    case PREF_AUTOAWAY_MODE:
-    case PREF_AUTOAWAY_MESSAGE:
-    case PREF_AUTOXA_MESSAGE:
-    case PREF_LASTACTIVITY:
-        return PREF_GROUP_PRESENCE;
-    case PREF_CONNECT_ACCOUNT:
-    case PREF_DEFAULT_ACCOUNT:
-    case PREF_CARBONS:
-    case PREF_RECEIPTS_SEND:
-    case PREF_RECEIPTS_REQUEST:
-    case PREF_REVEAL_OS:
-    case PREF_TLS_CERTPATH:
-    case PREF_CORRECTION_ALLOW:
-    case PREF_MAM:
-        return PREF_GROUP_CONNECTION;
-    case PREF_OTR_LOG:
-    case PREF_OTR_POLICY:
-    case PREF_OTR_SENDFILE:
-        return PREF_GROUP_OTR;
-    case PREF_PGP_LOG:
-    case PREF_PGP_SENDFILE:
-        return PREF_GROUP_PGP;
-    case PREF_BOOKMARK_INVITE:
-    case PREF_ROOM_LIST_CACHE:
-        return PREF_GROUP_MUC;
-    case PREF_PLUGINS_SOURCEPATH:
-        return PREF_GROUP_PLUGINS;
-    case PREF_OMEMO_LOG:
-    case PREF_OMEMO_POLICY:
-    case PREF_OMEMO_SENDFILE:
-        return PREF_GROUP_OMEMO;
-    default:
-        return NULL;
+    switch (pref)
+    {
+        case PREF_CLEAR_PERSIST_HISTORY:
+        case PREF_SPLASH:
+        case PREF_BEEP:
+        case PREF_THEME:
+        case PREF_VERCHECK:
+        case PREF_WINTITLE_SHOW:
+        case PREF_WINTITLE_GOODBYE:
+        case PREF_FLASH:
+        case PREF_INTYPE:
+        case PREF_HISTORY:
+        case PREF_OCCUPANTS:
+        case PREF_OCCUPANTS_JID:
+        case PREF_OCCUPANTS_WRAP:
+        case PREF_STATUSES:
+        case PREF_STATUSES_CONSOLE:
+        case PREF_STATUSES_CHAT:
+        case PREF_STATUSES_MUC:
+        case PREF_MUC_PRIVILEGES:
+        case PREF_PRESENCE:
+        case PREF_WRAP:
+        case PREF_TIME_CONSOLE:
+        case PREF_TIME_CHAT:
+        case PREF_TIME_MUC:
+        case PREF_TIME_CONFIG:
+        case PREF_TIME_PRIVATE:
+        case PREF_TIME_XMLCONSOLE:
+        case PREF_TIME_STATUSBAR:
+        case PREF_TIME_LASTACTIVITY:
+        case PREF_ROSTER:
+        case PREF_ROSTER_OFFLINE:
+        case PREF_ROSTER_RESOURCE:
+        case PREF_ROSTER_PRESENCE:
+        case PREF_ROSTER_STATUS:
+        case PREF_ROSTER_EMPTY:
+        case PREF_ROSTER_BY:
+        case PREF_ROSTER_ORDER:
+        case PREF_ROSTER_UNREAD:
+        case PREF_ROSTER_COUNT:
+        case PREF_ROSTER_COUNT_ZERO:
+        case PREF_ROSTER_PRIORITY:
+        case PREF_ROSTER_WRAP:
+        case PREF_ROSTER_RESOURCE_JOIN:
+        case PREF_ROSTER_CONTACTS:
+        case PREF_ROSTER_UNSUBSCRIBED:
+        case PREF_ROSTER_ROOMS:
+        case PREF_ROSTER_ROOMS_POS:
+        case PREF_ROSTER_ROOMS_BY:
+        case PREF_ROSTER_ROOMS_ORDER:
+        case PREF_ROSTER_ROOMS_UNREAD:
+        case PREF_ROSTER_ROOMS_SERVER:
+        case PREF_ROSTER_ROOMS_USE_AS_NAME:
+        case PREF_ROSTER_PRIVATE:
+        case PREF_RESOURCE_TITLE:
+        case PREF_RESOURCE_MESSAGE:
+        case PREF_ENC_WARN:
+        case PREF_INPBLOCK_DYNAMIC:
+        case PREF_TLS_SHOW:
+        case PREF_CONSOLE_MUC:
+        case PREF_CONSOLE_PRIVATE:
+        case PREF_CONSOLE_CHAT:
+        case PREF_COLOR_NICK:
+        case PREF_COLOR_NICK_OWN:
+        case PREF_ROSTER_COLOR_NICK:
+        case PREF_OCCUPANTS_COLOR_NICK:
+        case PREF_STATUSBAR_SHOW_NAME:
+        case PREF_STATUSBAR_SHOW_NUMBER:
+        case PREF_STATUSBAR_SHOW_READ:
+        case PREF_STATUSBAR_SELF:
+        case PREF_STATUSBAR_CHAT:
+        case PREF_STATUSBAR_ROOM:
+        case PREF_TITLEBAR_MUC_TITLE_JID:
+        case PREF_TITLEBAR_MUC_TITLE_NAME:
+        case PREF_SLASH_GUARD:
+            return PREF_GROUP_UI;
+        case PREF_STATES:
+        case PREF_OUTTYPE:
+            return PREF_GROUP_CHATSTATES;
+        case PREF_NOTIFY_TYPING:
+        case PREF_NOTIFY_TYPING_CURRENT:
+        case PREF_NOTIFY_CHAT:
+        case PREF_NOTIFY_CHAT_CURRENT:
+        case PREF_NOTIFY_CHAT_TEXT:
+        case PREF_NOTIFY_ROOM:
+        case PREF_NOTIFY_ROOM_MENTION:
+        case PREF_NOTIFY_ROOM_TRIGGER:
+        case PREF_NOTIFY_ROOM_CURRENT:
+        case PREF_NOTIFY_ROOM_TEXT:
+        case PREF_NOTIFY_INVITE:
+        case PREF_NOTIFY_SUB:
+        case PREF_NOTIFY_MENTION_CASE_SENSITIVE:
+        case PREF_NOTIFY_MENTION_WHOLE_WORD:
+        case PREF_TRAY:
+        case PREF_TRAY_READ:
+        case PREF_ADV_NOTIFY_DISCO_OR_VERSION:
+            return PREF_GROUP_NOTIFICATIONS;
+        case PREF_CHLOG:
+        case PREF_GRLOG:
+        case PREF_LOG_ROTATE:
+        case PREF_LOG_SHARED:
+            return PREF_GROUP_LOGGING;
+        case PREF_AVATAR_CMD:
+        case PREF_URL_OPEN_CMD:
+        case PREF_URL_SAVE_CMD:
+            return PREF_GROUP_EXECUTABLES;
+        case PREF_AUTOAWAY_CHECK:
+        case PREF_AUTOAWAY_MODE:
+        case PREF_AUTOAWAY_MESSAGE:
+        case PREF_AUTOXA_MESSAGE:
+        case PREF_LASTACTIVITY:
+            return PREF_GROUP_PRESENCE;
+        case PREF_CONNECT_ACCOUNT:
+        case PREF_DEFAULT_ACCOUNT:
+        case PREF_CARBONS:
+        case PREF_RECEIPTS_SEND:
+        case PREF_RECEIPTS_REQUEST:
+        case PREF_REVEAL_OS:
+        case PREF_TLS_CERTPATH:
+        case PREF_CORRECTION_ALLOW:
+        case PREF_MAM:
+            return PREF_GROUP_CONNECTION;
+        case PREF_OTR_LOG:
+        case PREF_OTR_POLICY:
+        case PREF_OTR_SENDFILE:
+            return PREF_GROUP_OTR;
+        case PREF_PGP_LOG:
+        case PREF_PGP_SENDFILE:
+            return PREF_GROUP_PGP;
+        case PREF_BOOKMARK_INVITE:
+        case PREF_ROOM_LIST_CACHE:
+            return PREF_GROUP_MUC;
+        case PREF_PLUGINS_SOURCEPATH:
+            return PREF_GROUP_PLUGINS;
+        case PREF_OMEMO_LOG:
+        case PREF_OMEMO_POLICY:
+            return PREF_GROUP_OMEMO;
+        default:
+            return NULL;
     }
 }
 
@@ -1937,257 +1937,256 @@ _get_group(preference_t pref)
 static const char*
 _get_key(preference_t pref)
 {
-    switch (pref) {
-    case PREF_CLEAR_PERSIST_HISTORY:
-        return "clear.persist_history";
-    case PREF_SPLASH:
-        return "splash";
-    case PREF_BEEP:
-        return "beep";
-    case PREF_THEME:
-        return "theme";
-    case PREF_VERCHECK:
-        return "vercheck";
-    case PREF_WINTITLE_SHOW:
-        return "wintitle.show";
-    case PREF_WINTITLE_GOODBYE:
-        return "wintitle.goodbye";
-    case PREF_FLASH:
-        return "flash";
-    case PREF_TRAY:
-        return "tray";
-    case PREF_TRAY_READ:
-        return "tray.read";
-    case PREF_ADV_NOTIFY_DISCO_OR_VERSION:
-        return "adv.notify.discoversion";
-    case PREF_INTYPE:
-        return "intype";
-    case PREF_HISTORY:
-        return "history";
-    case PREF_CARBONS:
-        return "carbons";
-    case PREF_RECEIPTS_SEND:
-        return "receipts.send";
-    case PREF_RECEIPTS_REQUEST:
-        return "receipts.request";
-    case PREF_REVEAL_OS:
-        return "reveal.os";
-    case PREF_OCCUPANTS:
-        return "occupants";
-    case PREF_OCCUPANTS_JID:
-        return "occupants.jid";
-    case PREF_OCCUPANTS_WRAP:
-        return "occupants.wrap";
-    case PREF_MUC_PRIVILEGES:
-        return "privileges";
-    case PREF_STATUSES:
-        return "statuses";
-    case PREF_STATUSES_CONSOLE:
-        return "statuses.console";
-    case PREF_STATUSES_CHAT:
-        return "statuses.chat";
-    case PREF_STATUSES_MUC:
-        return "statuses.muc";
-    case PREF_STATES:
-        return "enabled";
-    case PREF_OUTTYPE:
-        return "outtype";
-    case PREF_NOTIFY_TYPING:
-        return "typing";
-    case PREF_NOTIFY_TYPING_CURRENT:
-        return "typing.current";
-    case PREF_NOTIFY_CHAT:
-        return "message";
-    case PREF_NOTIFY_CHAT_CURRENT:
-        return "message.current";
-    case PREF_NOTIFY_CHAT_TEXT:
-        return "message.text";
-    case PREF_NOTIFY_ROOM:
-        return "room";
-    case PREF_NOTIFY_ROOM_TRIGGER:
-        return "room.trigger";
-    case PREF_NOTIFY_ROOM_MENTION:
-        return "room.mention";
-    case PREF_NOTIFY_ROOM_CURRENT:
-        return "room.current";
-    case PREF_NOTIFY_ROOM_TEXT:
-        return "room.text";
-    case PREF_NOTIFY_INVITE:
-        return "invite";
-    case PREF_NOTIFY_SUB:
-        return "sub";
-    case PREF_NOTIFY_MENTION_CASE_SENSITIVE:
-        return "room.mention.casesensitive";
-    case PREF_NOTIFY_MENTION_WHOLE_WORD:
-        return "room.mention.wholeword";
-    case PREF_CHLOG:
-        return "chlog";
-    case PREF_GRLOG:
-        return "grlog";
-    case PREF_AUTOAWAY_CHECK:
-        return "autoaway.check";
-    case PREF_AUTOAWAY_MODE:
-        return "autoaway.mode";
-    case PREF_AUTOAWAY_MESSAGE:
-        return "autoaway.awaymessage";
-    case PREF_AUTOXA_MESSAGE:
-        return "autoaway.xamessage";
-    case PREF_CONNECT_ACCOUNT:
-        return "account";
-    case PREF_DEFAULT_ACCOUNT:
-        return "defaccount";
-    case PREF_OTR_LOG:
-        return "log";
-    case PREF_OTR_POLICY:
-        return "policy";
-    case PREF_OTR_SENDFILE:
-        return "sendfile";
-    case PREF_LOG_ROTATE:
-        return "rotate";
-    case PREF_LOG_SHARED:
-        return "shared";
-    case PREF_PRESENCE:
-        return "presence";
-    case PREF_WRAP:
-        return "wrap";
-    case PREF_TIME_CONSOLE:
-        return "time.console";
-    case PREF_TIME_CHAT:
-        return "time.chat";
-    case PREF_TIME_MUC:
-        return "time.muc";
-    case PREF_TIME_CONFIG:
-        return "time.config";
-    case PREF_TIME_PRIVATE:
-        return "time.private";
-    case PREF_TIME_XMLCONSOLE:
-        return "time.xmlconsole";
-    case PREF_TIME_STATUSBAR:
-        return "time.statusbar";
-    case PREF_TIME_LASTACTIVITY:
-        return "time.lastactivity";
-    case PREF_ROSTER:
-        return "roster";
-    case PREF_ROSTER_OFFLINE:
-        return "roster.offline";
-    case PREF_ROSTER_RESOURCE:
-        return "roster.resource";
-    case PREF_ROSTER_PRESENCE:
-        return "roster.presence";
-    case PREF_ROSTER_STATUS:
-        return "roster.status";
-    case PREF_ROSTER_EMPTY:
-        return "roster.empty";
-    case PREF_ROSTER_BY:
-        return "roster.by";
-    case PREF_ROSTER_ORDER:
-        return "roster.order";
-    case PREF_ROSTER_UNREAD:
-        return "roster.unread";
-    case PREF_ROSTER_COUNT:
-        return "roster.count";
-    case PREF_ROSTER_COUNT_ZERO:
-        return "roster.count.zero";
-    case PREF_ROSTER_PRIORITY:
-        return "roster.priority";
-    case PREF_ROSTER_WRAP:
-        return "roster.wrap";
-    case PREF_ROSTER_RESOURCE_JOIN:
-        return "roster.resource.join";
-    case PREF_ROSTER_CONTACTS:
-        return "roster.contacts";
-    case PREF_ROSTER_UNSUBSCRIBED:
-        return "roster.unsubscribed";
-    case PREF_ROSTER_ROOMS:
-        return "roster.rooms";
-    case PREF_ROSTER_ROOMS_POS:
-        return "roster.rooms.pos";
-    case PREF_ROSTER_ROOMS_BY:
-        return "roster.rooms.by";
-    case PREF_ROSTER_ROOMS_ORDER:
-        return "roster.rooms.order";
-    case PREF_ROSTER_ROOMS_UNREAD:
-        return "roster.rooms.unread";
-    case PREF_ROSTER_ROOMS_SERVER:
-        return "roster.rooms.server";
-    case PREF_ROSTER_ROOMS_USE_AS_NAME:
-        return "roster.rooms.use.name";
-    case PREF_ROSTER_PRIVATE:
-        return "roster.private";
-    case PREF_RESOURCE_TITLE:
-        return "resource.title";
-    case PREF_RESOURCE_MESSAGE:
-        return "resource.message";
-    case PREF_INPBLOCK_DYNAMIC:
-        return "inpblock.dynamic";
-    case PREF_ENC_WARN:
-        return "enc.warn";
-    case PREF_TITLEBAR_MUC_TITLE_JID:
-        return "titlebar.muc.title.jid";
-    case PREF_TITLEBAR_MUC_TITLE_NAME:
-        return "titlebar.muc.title.name";
-    case PREF_PGP_LOG:
-        return "log";
-    case PREF_PGP_SENDFILE:
-        return "sendfile";
-    case PREF_TLS_CERTPATH:
-        return "tls.certpath";
-    case PREF_TLS_SHOW:
-        return "tls.show";
-    case PREF_LASTACTIVITY:
-        return "lastactivity";
-    case PREF_CONSOLE_MUC:
-        return "console.muc";
-    case PREF_CONSOLE_PRIVATE:
-        return "console.private";
-    case PREF_CONSOLE_CHAT:
-        return "console.chat";
-    case PREF_COLOR_NICK:
-        return "color.nick";
-    case PREF_COLOR_NICK_OWN:
-        return "color.nick.own";
-    case PREF_ROSTER_COLOR_NICK:
-        return "color.roster.nick";
-    case PREF_OCCUPANTS_COLOR_NICK:
-        return "color.occupants.nick";
-    case PREF_BOOKMARK_INVITE:
-        return "bookmark.invite";
-    case PREF_PLUGINS_SOURCEPATH:
-        return "sourcepath";
-    case PREF_ROOM_LIST_CACHE:
-        return "rooms.cache";
-    case PREF_STATUSBAR_SHOW_NAME:
-        return "statusbar.show.name";
-    case PREF_STATUSBAR_SHOW_NUMBER:
-        return "statusbar.show.number";
-    case PREF_STATUSBAR_SHOW_READ:
-        return "statusbar.show.read";
-    case PREF_STATUSBAR_SELF:
-        return "statusbar.self";
-    case PREF_STATUSBAR_CHAT:
-        return "statusbar.chat";
-    case PREF_STATUSBAR_ROOM:
-        return "statusbar.room";
-    case PREF_OMEMO_LOG:
-        return "log";
-    case PREF_OMEMO_POLICY:
-        return "policy";
-    case PREF_OMEMO_SENDFILE:
-        return "sendfile";
-    case PREF_CORRECTION_ALLOW:
-        return "correction.allow";
-    case PREF_AVATAR_CMD:
-        return "avatar.cmd";
-    case PREF_SLASH_GUARD:
-        return "slashguard";
-    case PREF_MAM:
-        return "mam";
-    case PREF_URL_OPEN_CMD:
-        return "url.open.cmd";
-    case PREF_URL_SAVE_CMD:
-        return "url.save.cmd";
-    default:
-        return NULL;
+    switch (pref)
+    {
+        case PREF_CLEAR_PERSIST_HISTORY:
+            return "clear.persist_history";
+        case PREF_SPLASH:
+            return "splash";
+        case PREF_BEEP:
+            return "beep";
+        case PREF_THEME:
+            return "theme";
+        case PREF_VERCHECK:
+            return "vercheck";
+        case PREF_WINTITLE_SHOW:
+            return "wintitle.show";
+        case PREF_WINTITLE_GOODBYE:
+            return "wintitle.goodbye";
+        case PREF_FLASH:
+            return "flash";
+        case PREF_TRAY:
+            return "tray";
+        case PREF_TRAY_READ:
+            return "tray.read";
+        case PREF_ADV_NOTIFY_DISCO_OR_VERSION:
+            return "adv.notify.discoversion";
+        case PREF_INTYPE:
+            return "intype";
+        case PREF_HISTORY:
+            return "history";
+        case PREF_CARBONS:
+            return "carbons";
+        case PREF_RECEIPTS_SEND:
+            return "receipts.send";
+        case PREF_RECEIPTS_REQUEST:
+            return "receipts.request";
+        case PREF_REVEAL_OS:
+            return "reveal.os";
+        case PREF_OCCUPANTS:
+            return "occupants";
+        case PREF_OCCUPANTS_JID:
+            return "occupants.jid";
+        case PREF_OCCUPANTS_WRAP:
+            return "occupants.wrap";
+        case PREF_MUC_PRIVILEGES:
+            return "privileges";
+        case PREF_STATUSES:
+            return "statuses";
+        case PREF_STATUSES_CONSOLE:
+            return "statuses.console";
+        case PREF_STATUSES_CHAT:
+            return "statuses.chat";
+        case PREF_STATUSES_MUC:
+            return "statuses.muc";
+        case PREF_STATES:
+            return "enabled";
+        case PREF_OUTTYPE:
+            return "outtype";
+        case PREF_NOTIFY_TYPING:
+            return "typing";
+        case PREF_NOTIFY_TYPING_CURRENT:
+            return "typing.current";
+        case PREF_NOTIFY_CHAT:
+            return "message";
+        case PREF_NOTIFY_CHAT_CURRENT:
+            return "message.current";
+        case PREF_NOTIFY_CHAT_TEXT:
+            return "message.text";
+        case PREF_NOTIFY_ROOM:
+            return "room";
+        case PREF_NOTIFY_ROOM_TRIGGER:
+            return "room.trigger";
+        case PREF_NOTIFY_ROOM_MENTION:
+            return "room.mention";
+        case PREF_NOTIFY_ROOM_CURRENT:
+            return "room.current";
+        case PREF_NOTIFY_ROOM_TEXT:
+            return "room.text";
+        case PREF_NOTIFY_INVITE:
+            return "invite";
+        case PREF_NOTIFY_SUB:
+            return "sub";
+        case PREF_NOTIFY_MENTION_CASE_SENSITIVE:
+            return "room.mention.casesensitive";
+        case PREF_NOTIFY_MENTION_WHOLE_WORD:
+            return "room.mention.wholeword";
+        case PREF_CHLOG:
+            return "chlog";
+        case PREF_GRLOG:
+            return "grlog";
+        case PREF_AUTOAWAY_CHECK:
+            return "autoaway.check";
+        case PREF_AUTOAWAY_MODE:
+            return "autoaway.mode";
+        case PREF_AUTOAWAY_MESSAGE:
+            return "autoaway.awaymessage";
+        case PREF_AUTOXA_MESSAGE:
+            return "autoaway.xamessage";
+        case PREF_CONNECT_ACCOUNT:
+            return "account";
+        case PREF_DEFAULT_ACCOUNT:
+            return "defaccount";
+        case PREF_OTR_LOG:
+            return "log";
+        case PREF_OTR_POLICY:
+            return "policy";
+        case PREF_OTR_SENDFILE:
+            return "sendfile";
+        case PREF_LOG_ROTATE:
+            return "rotate";
+        case PREF_LOG_SHARED:
+            return "shared";
+        case PREF_PRESENCE:
+            return "presence";
+        case PREF_WRAP:
+            return "wrap";
+        case PREF_TIME_CONSOLE:
+            return "time.console";
+        case PREF_TIME_CHAT:
+            return "time.chat";
+        case PREF_TIME_MUC:
+            return "time.muc";
+        case PREF_TIME_CONFIG:
+            return "time.config";
+        case PREF_TIME_PRIVATE:
+            return "time.private";
+        case PREF_TIME_XMLCONSOLE:
+            return "time.xmlconsole";
+        case PREF_TIME_STATUSBAR:
+            return "time.statusbar";
+        case PREF_TIME_LASTACTIVITY:
+            return "time.lastactivity";
+        case PREF_ROSTER:
+            return "roster";
+        case PREF_ROSTER_OFFLINE:
+            return "roster.offline";
+        case PREF_ROSTER_RESOURCE:
+            return "roster.resource";
+        case PREF_ROSTER_PRESENCE:
+            return "roster.presence";
+        case PREF_ROSTER_STATUS:
+            return "roster.status";
+        case PREF_ROSTER_EMPTY:
+            return "roster.empty";
+        case PREF_ROSTER_BY:
+            return "roster.by";
+        case PREF_ROSTER_ORDER:
+            return "roster.order";
+        case PREF_ROSTER_UNREAD:
+            return "roster.unread";
+        case PREF_ROSTER_COUNT:
+            return "roster.count";
+        case PREF_ROSTER_COUNT_ZERO:
+            return "roster.count.zero";
+        case PREF_ROSTER_PRIORITY:
+            return "roster.priority";
+        case PREF_ROSTER_WRAP:
+            return "roster.wrap";
+        case PREF_ROSTER_RESOURCE_JOIN:
+            return "roster.resource.join";
+        case PREF_ROSTER_CONTACTS:
+            return "roster.contacts";
+        case PREF_ROSTER_UNSUBSCRIBED:
+            return "roster.unsubscribed";
+        case PREF_ROSTER_ROOMS:
+            return "roster.rooms";
+        case PREF_ROSTER_ROOMS_POS:
+            return "roster.rooms.pos";
+        case PREF_ROSTER_ROOMS_BY:
+            return "roster.rooms.by";
+        case PREF_ROSTER_ROOMS_ORDER:
+            return "roster.rooms.order";
+        case PREF_ROSTER_ROOMS_UNREAD:
+            return "roster.rooms.unread";
+        case PREF_ROSTER_ROOMS_SERVER:
+            return "roster.rooms.server";
+        case PREF_ROSTER_ROOMS_USE_AS_NAME:
+            return "roster.rooms.use.name";
+        case PREF_ROSTER_PRIVATE:
+            return "roster.private";
+        case PREF_RESOURCE_TITLE:
+            return "resource.title";
+        case PREF_RESOURCE_MESSAGE:
+            return "resource.message";
+        case PREF_INPBLOCK_DYNAMIC:
+            return "inpblock.dynamic";
+        case PREF_ENC_WARN:
+            return "enc.warn";
+        case PREF_TITLEBAR_MUC_TITLE_JID:
+            return "titlebar.muc.title.jid";
+        case PREF_TITLEBAR_MUC_TITLE_NAME:
+            return "titlebar.muc.title.name";
+        case PREF_PGP_LOG:
+            return "log";
+        case PREF_PGP_SENDFILE:
+            return "sendfile";
+        case PREF_TLS_CERTPATH:
+            return "tls.certpath";
+        case PREF_TLS_SHOW:
+            return "tls.show";
+        case PREF_LASTACTIVITY:
+            return "lastactivity";
+        case PREF_CONSOLE_MUC:
+            return "console.muc";
+        case PREF_CONSOLE_PRIVATE:
+            return "console.private";
+        case PREF_CONSOLE_CHAT:
+            return "console.chat";
+        case PREF_COLOR_NICK:
+            return "color.nick";
+        case PREF_COLOR_NICK_OWN:
+            return "color.nick.own";
+        case PREF_ROSTER_COLOR_NICK:
+            return "color.roster.nick";
+        case PREF_OCCUPANTS_COLOR_NICK:
+            return "color.occupants.nick";
+        case PREF_BOOKMARK_INVITE:
+            return "bookmark.invite";
+        case PREF_PLUGINS_SOURCEPATH:
+            return "sourcepath";
+        case PREF_ROOM_LIST_CACHE:
+            return "rooms.cache";
+        case PREF_STATUSBAR_SHOW_NAME:
+            return "statusbar.show.name";
+        case PREF_STATUSBAR_SHOW_NUMBER:
+            return "statusbar.show.number";
+        case PREF_STATUSBAR_SHOW_READ:
+            return "statusbar.show.read";
+        case PREF_STATUSBAR_SELF:
+            return "statusbar.self";
+        case PREF_STATUSBAR_CHAT:
+            return "statusbar.chat";
+        case PREF_STATUSBAR_ROOM:
+            return "statusbar.room";
+        case PREF_OMEMO_LOG:
+            return "log";
+        case PREF_OMEMO_POLICY:
+            return "policy";
+        case PREF_CORRECTION_ALLOW:
+            return "correction.allow";
+        case PREF_AVATAR_CMD:
+            return "avatar.cmd";
+        case PREF_SLASH_GUARD:
+            return "slashguard";
+        case PREF_MAM:
+            return "mam";
+        case PREF_URL_OPEN_CMD:
+            return "url.open.cmd";
+        case PREF_URL_SAVE_CMD:
+            return "url.save.cmd";
+        default:
+            return NULL;
     }
 }
 
diff --git a/src/config/preferences.h b/src/config/preferences.h
index a9261853..141d8fce 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -165,7 +165,6 @@ typedef enum {
     PREF_STATUSBAR_ROOM,
     PREF_OMEMO_LOG,
     PREF_OMEMO_POLICY,
-    PREF_OMEMO_SENDFILE,
     PREF_OCCUPANTS_WRAP,
     PREF_CORRECTION_ALLOW,
     PREF_AVATAR_CMD,
diff --git a/src/ui/console.c b/src/ui/console.c
index cb2bb888..03a5b21f 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -2192,13 +2192,7 @@ cons_show_omemo_prefs(void)
     cons_show("OMEMO char (/omemo char)     : %s", ch);
     free(ch);
 
-    if (prefs_get_boolean(PREF_OMEMO_SENDFILE)) {
-        cons_show("Allow sending unencrypted files in an OMEMO session via /sendfile (/omemo sendfile): ON");
-    } else {
-        cons_show("Allow sending unencrypted files in an OMEMO session via /sendfile (/omemo sendfile): OFF");
-    }
-
-    cons_alert(NULL);
+    cons_alert();
 }
 
 void