aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2019-03-13 07:03:35 -0400
committerB. Watson <yalhcru@gmail.com>2019-03-13 07:03:35 -0400
commit54bca97a24026cc3d8edea95967f3a57b9ed9b99 (patch)
treeb7e7d4995646973d6232f1e4d3a382bbb570c5c5
parentdeae0686b48429a455ad8cf410caf890f1e8a66f (diff)
downloadfujichat-54bca97a24026cc3d8edea95967f3a57b9ed9b99.tar.gz
add /clear
-rw-r--r--doc/commands.txt7
-rw-r--r--src/commands.c6
-rw-r--r--src/fujichat.atrbin92176 -> 92176 bytes
-rw-r--r--src/fujichat.c4
-rw-r--r--src/fujitest.atrbin92176 -> 92176 bytes
5 files changed, 14 insertions, 3 deletions
diff --git a/doc/commands.txt b/doc/commands.txt
index 476e8c1..3551e3b 100644
--- a/doc/commands.txt
+++ b/doc/commands.txt
@@ -146,6 +146,11 @@ by FujiChat. This command usually isn't necessary: if FujiChat is given
an unknown command, it will send it to the server as-is. /QUOTE is more
useful for development and testing than for normal use.
+---
+Name: /CLEAR
+
+Clears the screen. Useful if someone's being nosey, maybe.
+
-------------------------
IRC protocol commands: any command you enter (starting with a slash) that
@@ -159,7 +164,7 @@ Name: /TIME
Shows the server's current time. The format may vary, but usually looks
something like:
-391 hitchcock.freenode.net :Wednesary March 13 2019 -- 10:08:11 +00:00
+391 hitchcock.freenode.net :Wednesday March 13 2019 -- 10:08:11 +00:00
---
Name: /WHOIS
diff --git a/src/commands.c b/src/commands.c
index f23b81d..5f9ad04 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -18,6 +18,7 @@ void cmd_quote(void);
void cmd_ver(void);
void cmd_version(void);
void do_me(void);
+void cmd_clear(void);
#ifdef FEAT_COLOR_COMMAND
void cmd_fgcolor(void);
void cmd_bgcolor(void);
@@ -36,6 +37,7 @@ fuji_cmd_t cmd_list[] = {
{ "VER", ARGTYPE_OPT, cmd_version },
{ "VERSION", ARGTYPE_OPT, cmd_version },
{ "ME", ARGTYPE_REQUIRED, do_me },
+ { "CLEAR", ARGTYPE_NONE, cmd_clear },
#ifdef FEAT_COLOR_COMMAND
{ "FGCOLOR", ARGTYPE_REQUIRED, cmd_fgcolor },
{ "BGCOLOR", ARGTYPE_REQUIRED, cmd_bgcolor },
@@ -140,6 +142,10 @@ void cmd_nick(void) {
printf("> You are now known as %s\n", config->nick);
}
+void cmd_clear(void) {
+ putchar(125); /* ATASCII screen clear code */
+}
+
#ifdef FEAT_COLOR_COMMAND
static void do_color(u16_t reg) {
u16_t c;
diff --git a/src/fujichat.atr b/src/fujichat.atr
index 98d81b6..1425881 100644
--- a/src/fujichat.atr
+++ b/src/fujichat.atr
Binary files differ
diff --git a/src/fujichat.c b/src/fujichat.c
index cf147cf..2f369d5 100644
--- a/src/fujichat.c
+++ b/src/fujichat.c
@@ -186,14 +186,14 @@ void main(void) {
POKE(710, config->bg_color);
POKE(709, config->fg_color);
- printf("Server name/IP, [C]onfig, or [D]OS\n");
+ printf("Server name/IP, [S]etup, or [D]OS\n");
printf("[%s]: ", config->server);
fflush(stdout);
get_line(cmdbuf, HOSTLEN);
if(strcasecmp(cmdbuf, "d") == 0) {
exit(0);
- } else if(strcasecmp(cmdbuf, "c") == 0) {
+ } else if(strcasecmp(cmdbuf, "s") == 0) {
i = atari_exec(SETUP_FILENAME);
printf("Error %d!\n", i);
bell();
diff --git a/src/fujitest.atr b/src/fujitest.atr
index 98f0d4d..5bb7da9 100644
--- a/src/fujitest.atr
+++ b/src/fujitest.atr
Binary files differ