diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-08-25 22:46:02 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-08-25 22:46:43 +0200 |
commit | 274d5f03e7da211e5a52dbd2309c8888c7499c6c (patch) | |
tree | 871acd2ab78dee0d2c2871446aaed1e9e7ac8da0 | |
parent | 2f19e5a7337fc2058aff665d45798f52b3499db4 (diff) | |
download | xK-274d5f03e7da211e5a52dbd2309c8888c7499c6c.tar.gz xK-274d5f03e7da211e5a52dbd2309c8888c7499c6c.tar.xz xK-274d5f03e7da211e5a52dbd2309c8888c7499c6c.zip |
xC: give the /away command a proper handler
Multiple words should be passed to the server as a single argument.
-rw-r--r-- | xC.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -12938,6 +12938,16 @@ handle_command_kill (struct handler_args *a) } 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) { if (!*a->arguments) @@ -13002,7 +13012,6 @@ TRIVIAL_HANDLER (who, "WHO") TRIVIAL_HANDLER (motd, "MOTD") TRIVIAL_HANDLER (oper, "OPER") TRIVIAL_HANDLER (stats, "STATS") -TRIVIAL_HANDLER (away, "AWAY") // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |