mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 18:36:21 +00:00
ox: Add /ox log command
This commit is contained in:
@@ -7725,6 +7725,31 @@ cmd_ox(ProfWin* window, const char* const command, gchar** args)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_ox_log(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
char* choice = args[1];
|
||||
if (g_strcmp0(choice, "on") == 0) {
|
||||
prefs_set_string(PREF_OX_LOG, "on");
|
||||
cons_show("OX messages will be logged as plaintext.");
|
||||
if (!prefs_get_boolean(PREF_CHLOG)) {
|
||||
cons_show("Chat logging is currently disabled, use '/logging chat on' to enable.");
|
||||
}
|
||||
} else if (g_strcmp0(choice, "off") == 0) {
|
||||
prefs_set_string(PREF_OX_LOG, "off");
|
||||
cons_show("OX message logging disabled.");
|
||||
} else if (g_strcmp0(choice, "redact") == 0) {
|
||||
prefs_set_string(PREF_OX_LOG, "redact");
|
||||
cons_show("OX messages will be logged as '[redacted]'.");
|
||||
if (!prefs_get_boolean(PREF_CHLOG)) {
|
||||
cons_show("Chat logging is currently disabled, use '/logging chat on' to enable.");
|
||||
}
|
||||
} else {
|
||||
cons_bad_cmd_usage(command);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#endif // HAVE_LIBGPGME
|
||||
|
||||
gboolean
|
||||
|
||||
Reference in New Issue
Block a user