mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 14:06:21 +00:00
Move /os into /privacy os
Related to https://github.com/profanity-im/profanity/issues/1836
This commit is contained in:
@@ -1075,6 +1075,7 @@ cmd_ac_init(void)
|
||||
|
||||
privacy_ac = autocomplete_new();
|
||||
autocomplete_add(privacy_ac, "logging");
|
||||
autocomplete_add(privacy_ac, "os");
|
||||
|
||||
privacy_log_ac = autocomplete_new();
|
||||
autocomplete_add(privacy_log_ac, "on");
|
||||
@@ -2031,7 +2032,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
||||
// autocomplete boolean settings
|
||||
gchar* boolean_choices[] = { "/beep", "/states", "/outtype", "/flash", "/splash",
|
||||
"/history", "/vercheck", "/privileges", "/wrap",
|
||||
"/carbons", "/os", "/slashguard", "/mam", "/silence" };
|
||||
"/carbons", "/slashguard", "/mam", "/silence" };
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(boolean_choices); i++) {
|
||||
result = autocomplete_param_with_func(input, boolean_choices[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
||||
@@ -4239,6 +4240,11 @@ _privacy_autocomplete(ProfWin* window, const char* const input, gboolean previou
|
||||
return found;
|
||||
}
|
||||
|
||||
found = autocomplete_param_with_func(input, "/privacy os", prefs_autocomplete_boolean_choice, previous, NULL);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
@@ -2448,19 +2448,6 @@ static const struct cmd_t command_defs[] = {
|
||||
"/avatar get thor@valhalla.edda",
|
||||
"/avatar open freyja@vanaheimr.edda") },
|
||||
|
||||
{ CMD_PREAMBLE("/os",
|
||||
parse_args, 1, 1, &cons_os_setting)
|
||||
CMD_MAINFUNC(cmd_os)
|
||||
CMD_TAGS(
|
||||
CMD_TAG_DISCOVERY)
|
||||
CMD_SYN(
|
||||
"/os <on>|<off>")
|
||||
CMD_DESC(
|
||||
"Choose whether to include the OS name if a user asks for software information (XEP-0092).")
|
||||
CMD_ARGS(
|
||||
{ "on|off", "" })
|
||||
},
|
||||
|
||||
{ CMD_PREAMBLE("/correction",
|
||||
parse_args, 1, 2, &cons_correction_setting)
|
||||
CMD_MAINFUNC(cmd_correction)
|
||||
@@ -2723,17 +2710,24 @@ static const struct cmd_t command_defs[] = {
|
||||
|
||||
{ CMD_PREAMBLE("/privacy",
|
||||
parse_args, 2, 3, &cons_privacy_setting)
|
||||
CMD_SUBFUNCS(
|
||||
{ "os", cmd_os })
|
||||
CMD_MAINFUNC(cmd_privacy)
|
||||
CMD_TAGS(
|
||||
CMD_TAG_CHAT)
|
||||
CMD_TAG_CHAT,
|
||||
CMD_TAG_DISCOVERY)
|
||||
CMD_SYN(
|
||||
"/privacy logging on|redact|off")
|
||||
"/privacy logging on|redact|off",
|
||||
"/privacy os on|off")
|
||||
CMD_DESC(
|
||||
"Configure privacy settings.")
|
||||
CMD_ARGS(
|
||||
{ "logging on|redact|off", "Switch chat logging. This will also disable logging in the internally used SQL database. Your messages will not be saved anywhere locally. This might have unintended consequences, such as not being able to decrypt OMEMO encrypted messages received later via MAM, and should be used with caution." })
|
||||
{ "logging on|redact|off", "Switch chat logging. This will also disable logging in the internally used SQL database. Your messages will not be saved anywhere locally. This might have unintended consequences, such as not being able to decrypt OMEMO encrypted messages received later via MAM, and should be used with caution." },
|
||||
{ "os on|off", "Choose whether to include the OS name if a user asks for software information (XEP-0092)." }
|
||||
)
|
||||
CMD_EXAMPLES(
|
||||
"/privacy logging off")
|
||||
"/privacy logging off",
|
||||
"/privacy os off")
|
||||
},
|
||||
// NEXT-COMMAND (search helper)
|
||||
};
|
||||
|
||||
@@ -9352,7 +9352,7 @@ cmd_avatar(ProfWin* window, const char* const command, gchar** args)
|
||||
gboolean
|
||||
cmd_os(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
_cmd_set_boolean_preference(args[0], "Revealing OS name", PREF_REVEAL_OS);
|
||||
_cmd_set_boolean_preference(args[1], "Revealing OS name", PREF_REVEAL_OS);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user