xC: give the /away command a proper handler

Multiple words should be passed to the server as a single argument.
This commit is contained in:
Přemysl Eric Janouch 2023-08-25 22:46:02 +02:00
parent 2f19e5a733
commit 274d5f03e7
Signed by: p
GPG Key ID: A0420B94F92B9493

11
xC.c
View File

@ -12937,6 +12937,16 @@ handle_command_kill (struct handler_args *a)
return true;
}
static bool
handle_command_away (struct handler_args *a)
{
if (*a->arguments)
irc_send (a->s, "AWAY :%s", a->arguments);
else
irc_send (a->s, "AWAY");
return true;
}
static bool
handle_command_nick (struct handler_args *a)
{
@ -13002,7 +13012,6 @@ TRIVIAL_HANDLER (who, "WHO")
TRIVIAL_HANDLER (motd, "MOTD")
TRIVIAL_HANDLER (oper, "OPER")
TRIVIAL_HANDLER (stats, "STATS")
TRIVIAL_HANDLER (away, "AWAY")
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -