Added groupchat logs

closes #168
This commit is contained in:
James Booth
2013-05-05 00:16:10 +01:00
parent c1cf0b433e
commit 8c5866ff52
7 changed files with 149 additions and 1 deletions

View File

@@ -115,6 +115,7 @@ static gboolean _cmd_set_intype(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_flash(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_splash(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_chlog(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_grlog(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_history(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_states(gchar **args, struct cmd_help_t help);
static gboolean _cmd_set_outtype(gchar **args, struct cmd_help_t help);
@@ -597,6 +598,16 @@ static struct cmd_t setting_commands[] =
"Switch chat logging on or off.",
"This setting will be enabled if /history is set to on.",
"When disabling this option, /history will also be disabled.",
"See the /grlog setting for enabling logging of chat room (groupchat) messages.",
NULL } } },
{ "/grlog",
_cmd_set_grlog, parse_args, 1, 1,
{ "/grlog on|off", "Chat logging of chat rooms to file",
{ "/grlog on|off",
"-------------",
"Switch chat room logging on or off.",
"See the /chlog setting for enabling logging of one to one chat.",
NULL } } },
{ "/states",
@@ -1107,6 +1118,8 @@ _cmd_complete_parameters(char *input, int *size)
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/chlog",
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/grlog",
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/mouse",
prefs_autocomplete_boolean_choice);
_parameter_autocomplete(input, size, "/history",
@@ -2783,6 +2796,15 @@ _cmd_set_chlog(gchar **args, struct cmd_help_t help)
return result;
}
static gboolean
_cmd_set_grlog(gchar **args, struct cmd_help_t help)
{
gboolean result = _cmd_set_boolean_preference(args[0], help,
"Groupchat logging", PREF_GRLOG);
return result;
}
static gboolean
_cmd_set_mouse(gchar **args, struct cmd_help_t help)
{