diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-09 00:13:54 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-09 00:13:54 -0400 |
| commit | 632b484974d98742cf67274838fcc4bc2c078e6a (patch) | |
| tree | e6008fda9043366238b851449ae53eda7482dd6f /src/cmd.c | |
| parent | 05c066e18ac9ad909379634089813350841ce70e (diff) | |
| download | fujinet-chat-632b484974d98742cf67274838fcc4bc2c078e6a.tar.gz | |
auto-away on ATRACT, auto-un-away on keystroke.
Diffstat (limited to 'src/cmd.c')
| -rw-r--r-- | src/cmd.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -12,6 +12,7 @@ char *command, *arg1, *arg2, *arg3; static char *target; +static void do_away(void); static void do_color(void); static void do_ctcp(void); static void do_info(void); @@ -36,9 +37,10 @@ typedef struct { } cmd_t; /* future commands: - AWAY OP DEOP VOICE DEVOICE KICK BAN KB IGNORE UNIGNORE MODE + OP DEOP VOICE DEVOICE KICK BAN KB IGNORE UNIGNORE MODE */ cmd_t command_defs[] = { + { "AWAY", do_away, 1 }, { "COLOR", do_color, 1 }, { "CTCP", do_ctcp, 1 }, { "INFO", do_info, 0 }, @@ -344,6 +346,13 @@ static void do_msg(void) { } } +static void do_away(void) { + OS.atract = 0x80; + irc_away = 1; + txbuf_set_str2("AWAY :", arg1); + txbuf_send(); +} + static int cmd_local(void) { arg1 = nextarg(command); |
