aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-11 23:43:58 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-11 23:43:58 -0400
commit819095bcf226d6b1a1cd71f8b0150710bc9850a0 (patch)
tree2213f46d29b818d24172486a6c3193264f01da6b
parent4ac4aa49d77da3f471ca34a025074cf4a10be841 (diff)
downloadfujinet-chat-819095bcf226d6b1a1cd71f8b0150710bc9850a0.tar.gz
Add Start+T, dup checking in scr_create().
-rw-r--r--TODO5
-rw-r--r--doc/ideas.txt5
-rw-r--r--doc/ui_keys.txt2
-rw-r--r--src/cmd.c9
-rw-r--r--src/irc.c12
-rw-r--r--src/screen.c5
6 files changed, 25 insertions, 13 deletions
diff --git a/TODO b/TODO
index 7122d3c..efaf391 100644
--- a/TODO
+++ b/TODO
@@ -4,6 +4,11 @@ FujiChat features, we're almost at parity!
- Nick tab completion. FujiChat's was very lame, make this one
less lame. It can't be perfect due to limited RAM.
+- Configurable ctcp version response.
+- Keyboard buffer, if possible. Right now we miss the occasional
+ keystroke when typing fast & furious during network I/O. Not
+ sure how to accomplish this with FujiNet (the old FujiChat
+ key buffer actually hooked into the SLIP code).
Other stuff:
diff --git a/doc/ideas.txt b/doc/ideas.txt
index 55b5901..f70e47f 100644
--- a/doc/ideas.txt
+++ b/doc/ideas.txt
@@ -22,11 +22,6 @@ Features that should be implemented:
we won't be using WSYNC, it opens up the possibility of
using DLIs (if I can think of a useful use for them).
-- Keyboard buffer, if possible. Right now we miss the occasional
- keystroke when typing fast & furious during network I/O. Not
- sure how to accomplish this with FujiNet (the old FujiChat
- key buffer actually hooked into the SLIP code).
-
- Adaptive scrollback (dynamic screen size). Using fewer screens
would mean you get more scroll. Shorter screens steal lines from
the top of the tallest screen as needed. Requires a display list
diff --git a/doc/ui_keys.txt b/doc/ui_keys.txt
index c89df33..dd9b9e8 100644
--- a/doc/ui_keys.txt
+++ b/doc/ui_keys.txt
@@ -16,9 +16,11 @@ N - in channel screen, do a /names #channel. in [server], last
channel with traffic. no effect elsewhere.
P - in a query screen, do a /ping <nick>. in [private], last
nick who PMed. no effect elsewhere.
+T - /topic #channel
Future plans:
+E - show full editbox (instead of screen).
J - join last channel you were invited to.
Ctrl-X - in a channel screen, /part the channel and close the
screen. no effect elsewhere.
diff --git a/src/cmd.c b/src/cmd.c
index 0c6f1a6..0ef8617 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -167,8 +167,7 @@ static void do_j(void) {
}
if(have_commas())
return;
- if(!scr_getbyname(arg1))
- scr_create(arg1, 1);
+ scr_create(arg1, 1);
do_j1();
}
@@ -355,18 +354,16 @@ static void do_color(void) {
}
static void do_query(void) {
- /* don't create a query if we already got one! */
- if(scr_getbyname(arg1))
- return;
-
if(scr_create(arg1, 1) == 0xff) {
err_marker();
scr_print_current("Can't create query, all screens in use\n");
return;
}
+ /*
scr_print_current("Starting conversation with ");
scr_print_current(arg1);
scr_eol_current();
+ */
}
static void do_msg(void) {
diff --git a/src/irc.c b/src/irc.c
index 9777392..fa39df5 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -292,7 +292,7 @@ static void do_topic(void) {
static void do_kick(void) {
scr_print_active(msg_src);
scr_print_active(" has kicked ");
- scr_print_active(msg_args[2]);
+ scr_print_active(msg_args[1]);
scr_print_active(" from ");
scr_print_active(msg_dest);
print_reason();
@@ -768,6 +768,13 @@ void ui_whois_or_ping(char is_ping) {
}
}
+void ui_topic(void) {
+ if(!cur_is_chan())
+ return;
+ txbuf_set_str2("TOPIC ", scr_names[scr_current]);
+ txbuf_send();
+}
+
void ui_part(void) {
if(!cur_is_chan())
return;
@@ -863,6 +870,9 @@ static void start_keystroke(void) {
case 'p':
ui_whois_or_ping(1);
return;
+ case 't':
+ ui_topic();
+ break;
case 's':
edbox_hide();
/* fall thru */
diff --git a/src/screen.c b/src/screen.c
index cae2585..5852208 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -61,10 +61,13 @@ void scr_init(void) {
scr_display(0);
}
-/* TODO: don't create screen if it already exists! */
char scr_create(const char *name, char display) {
int i;
+ /* don't create a duplicate screen */
+ if( (i = scr_getbyname(name)) )
+ return i;
+
for(i = 0; i < MAX_SCREENS; i++) {
if(scr_status[i] == SCR_UNUSED) {
strcpy(scr_names[i], name);