Added /clear command to clear current window
This commit is contained in:
@@ -99,6 +99,7 @@ static gboolean _cmd_sub(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_msg(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_tiny(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_close(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_clear(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_join(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_set_beep(gchar **args, struct cmd_help_t help);
|
||||
static gboolean _cmd_set_notify(gchar **args, struct cmd_help_t help);
|
||||
@@ -393,6 +394,14 @@ static struct cmd_t main_commands[] =
|
||||
"If in a chat room, you will leave the room.",
|
||||
NULL } } },
|
||||
|
||||
{ "/clear",
|
||||
_cmd_clear, parse_args, 0, 0,
|
||||
{ "/clear", "Clear current window.",
|
||||
{ "/clear",
|
||||
"------",
|
||||
"Clear the current window.",
|
||||
NULL } } },
|
||||
|
||||
{ "/quit",
|
||||
_cmd_quit, parse_args, 0, 0,
|
||||
{ "/quit", "Quit Profanity.",
|
||||
@@ -2100,6 +2109,13 @@ _cmd_tiny(gchar **args, struct cmd_help_t help)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cmd_clear(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
win_current_clear();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cmd_close(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user