diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-02-11 13:26:57 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-02-11 13:26:57 -0500 |
| commit | b7b86e3a26d4bfba9c49f0a24ec030a7b3ebd8a3 (patch) | |
| tree | d2cb7323c78a4983e2a498110a077aaf24d1f696 /src/cmd.c | |
| download | fujinet-chat-b7b86e3a26d4bfba9c49f0a24ec030a7b3ebd8a3.tar.gz | |
initial commit
Diffstat (limited to 'src/cmd.c')
| -rw-r--r-- | src/cmd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cmd.c b/src/cmd.c new file mode 100644 index 0000000..3c7f482 --- /dev/null +++ b/src/cmd.c @@ -0,0 +1,19 @@ +#include <atari.h> +#include <stdio.h> +#include "irc.h" + +void cmd_chan_text(const char *cmd) { + txbuf_set_str("PRIVMSG "); + txbuf_append_str(channel); + txbuf_append_str(" :"); + txbuf_append_str(cmd); + txbuf_send(); +} + +void cmd_command(const char *cmd) { + if(*cmd == '/') + txbuf_send_str(cmd + 1); + else if(channel[0]) + cmd_chan_text(cmd); + else ui_print("*** You are not on a channel\n"); +} |
