From 274d5f03e7da211e5a52dbd2309c8888c7499c6c Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Fri, 25 Aug 2023 22:46:02 +0200 Subject: xC: give the /away command a proper handler Multiple words should be passed to the server as a single argument. --- xC.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xC.c b/xC.c index 5a59a8f..c464aaa 100644 --- a/xC.c +++ b/xC.c @@ -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") // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3-70-g09d2