Stop ctrl-c quitting with /ctrlc off
This commit is contained in:
@@ -116,6 +116,7 @@ static gboolean _cmd_set_chlog(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);
|
||||
static gboolean _cmd_set_ctrlc(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_vercheck(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_away(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_online(gchar **args, struct cmd_help_t help);
|
||||
@@ -485,6 +486,15 @@ static struct cmd_t setting_commands[] =
|
||||
"Config file value : maxsize=bytes",
|
||||
NULL } } },
|
||||
|
||||
{ "/ctrlc",
|
||||
_cmd_set_ctrlc, parse_args, 1, 1,
|
||||
{ "/ctrlc on|off", "Set ctrl-c to quit profanity.",
|
||||
{ "/ctrlc on|off",
|
||||
"---------------",
|
||||
"Setting this option will allow you to quit using ctrl-c.",
|
||||
NULL } } },
|
||||
|
||||
|
||||
{ "/priority",
|
||||
_cmd_set_priority, parse_args, 1, 1,
|
||||
{ "/priority <value>", "Set priority for connection.",
|
||||
@@ -855,6 +865,8 @@ _cmd_complete_parameters(char *input, int *size)
|
||||
prefs_autocomplete_boolean_choice);
|
||||
_parameter_autocomplete(input, size, "/states",
|
||||
prefs_autocomplete_boolean_choice);
|
||||
_parameter_autocomplete(input, size, "/ctrlc",
|
||||
prefs_autocomplete_boolean_choice);
|
||||
_parameter_autocomplete(input, size, "/outtype",
|
||||
prefs_autocomplete_boolean_choice);
|
||||
_parameter_autocomplete(input, size, "/flash",
|
||||
@@ -1389,6 +1401,13 @@ _cmd_set_states(gchar **args, struct cmd_help_t help)
|
||||
"Sending chat states", prefs_set_states);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cmd_set_ctrlc(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
return _cmd_set_boolean_preference(args, help, "/ctrlc",
|
||||
"Ctrl-C quit", prefs_set_ctrlc);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cmd_set_outtype(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user