mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 02:16:22 +00:00
fix(history): address PR #116 review feedback
- console: drop orphaned `/logging chat` reference from cons_privacy_setting() — the subcommand was removed, PREF_CHLOG now tracks PREF_HISTORY implicitly - console: delete cons_logging_setting() and remove its call from cons_show_log_prefs() — every line in it referenced /logging chat or /logging group, both now invalid after the deprecation below - command: deprecate /logging command. It now prints a single notice pointing to /history; CMD_PREAMBLE trimmed (min_args=0, no setting_func, syntax/args/examples dropped); subcommand 'group' removed from autocomplete The SQLite history-load gap for /correction off is split out into a follow-up — out of scope for this PR.
This commit is contained in:
@@ -1147,8 +1147,6 @@ cmd_ac_init(void)
|
|||||||
autocomplete_add(status_state_ac, "xa");
|
autocomplete_add(status_state_ac, "xa");
|
||||||
autocomplete_add(status_state_ac, "dnd");
|
autocomplete_add(status_state_ac, "dnd");
|
||||||
|
|
||||||
autocomplete_add(logging_ac, "group");
|
|
||||||
|
|
||||||
autocomplete_add(privacy_ac, "logging");
|
autocomplete_add(privacy_ac, "logging");
|
||||||
autocomplete_add(privacy_ac, "os");
|
autocomplete_add(privacy_ac, "os");
|
||||||
|
|
||||||
|
|||||||
@@ -1660,19 +1660,14 @@ static const struct cmd_t command_defs[] = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
{ CMD_PREAMBLE("/logging",
|
{ CMD_PREAMBLE("/logging",
|
||||||
parse_args, 2, 3, &cons_logging_setting)
|
parse_args, 0, 3, NULL)
|
||||||
CMD_MAINFUNC(cmd_logging)
|
CMD_MAINFUNC(cmd_logging)
|
||||||
CMD_TAGS(
|
CMD_TAGS(
|
||||||
CMD_TAG_CHAT)
|
CMD_TAG_CHAT)
|
||||||
CMD_SYN(
|
CMD_SYN(
|
||||||
"/logging group on|off")
|
"/logging")
|
||||||
CMD_DESC(
|
CMD_DESC(
|
||||||
"Configure groupchat (MUC) logging. "
|
"Deprecated. Use '/history' instead.")
|
||||||
"Regular chat logging is controlled by /history.")
|
|
||||||
CMD_ARGS(
|
|
||||||
{ "group on|off", "Enable/Disable groupchat (room) logging." })
|
|
||||||
CMD_EXAMPLES(
|
|
||||||
"/logging group off")
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{ CMD_PREAMBLE("/states",
|
{ CMD_PREAMBLE("/states",
|
||||||
|
|||||||
@@ -6731,17 +6731,7 @@ cmd_privacy(ProfWin* window, const char* const command, gchar** args)
|
|||||||
gboolean
|
gboolean
|
||||||
cmd_logging(ProfWin* window, const char* const command, gchar** args)
|
cmd_logging(ProfWin* window, const char* const command, gchar** args)
|
||||||
{
|
{
|
||||||
if (args[0] == NULL) {
|
cons_show("The '/logging' command is deprecated, use '/history' instead.");
|
||||||
cons_logging_setting();
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_strcmp0(args[0], "group") == 0 && args[1] != NULL) {
|
|
||||||
_cmd_set_boolean_preference(args[1], "Groupchat logging", PREF_GRLOG);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cons_bad_cmd_usage(command);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1948,27 +1948,12 @@ cons_log_setting(void)
|
|||||||
cons_show("Log level (/log level) : %s", level);
|
cons_show("Log level (/log level) : %s", level);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cons_logging_setting(void)
|
|
||||||
{
|
|
||||||
if (prefs_get_boolean(PREF_CHLOG))
|
|
||||||
cons_show("Chat logging (/logging chat) : ON");
|
|
||||||
else
|
|
||||||
cons_show("Chat logging (/logging chat) : OFF");
|
|
||||||
|
|
||||||
if (prefs_get_boolean(PREF_GRLOG))
|
|
||||||
cons_show("Groupchat logging (/logging group) : ON");
|
|
||||||
else
|
|
||||||
cons_show("Groupchat logging (/logging group) : OFF");
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cons_show_log_prefs(void)
|
cons_show_log_prefs(void)
|
||||||
{
|
{
|
||||||
cons_show("Logging preferences:");
|
cons_show("Logging preferences:");
|
||||||
cons_show("");
|
cons_show("");
|
||||||
cons_log_setting();
|
cons_log_setting();
|
||||||
cons_logging_setting();
|
|
||||||
|
|
||||||
cons_alert(NULL);
|
cons_alert(NULL);
|
||||||
}
|
}
|
||||||
@@ -2862,11 +2847,6 @@ cons_privacy_setting(void)
|
|||||||
{
|
{
|
||||||
cons_show("Database logging : %s", prefs_get_string(PREF_DBLOG));
|
cons_show("Database logging : %s", prefs_get_string(PREF_DBLOG));
|
||||||
|
|
||||||
if (prefs_get_boolean(PREF_CHLOG)) {
|
|
||||||
cons_show("Chat logging (/logging chat) : ON");
|
|
||||||
} else {
|
|
||||||
cons_show("Chat logging (/logging chat) : OFF");
|
|
||||||
}
|
|
||||||
if (prefs_get_boolean(PREF_HISTORY)) {
|
if (prefs_get_boolean(PREF_HISTORY)) {
|
||||||
cons_show("Chat history (/history) : ON");
|
cons_show("Chat history (/history) : ON");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -330,7 +330,6 @@ void cons_history_setting(void);
|
|||||||
void cons_carbons_setting(void);
|
void cons_carbons_setting(void);
|
||||||
void cons_receipts_setting(void);
|
void cons_receipts_setting(void);
|
||||||
void cons_log_setting(void);
|
void cons_log_setting(void);
|
||||||
void cons_logging_setting(void);
|
|
||||||
void cons_autoaway_setting(void);
|
void cons_autoaway_setting(void);
|
||||||
void cons_reconnect_setting(void);
|
void cons_reconnect_setting(void);
|
||||||
void cons_autoping_setting(void);
|
void cons_autoping_setting(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user