From ff02ca89a0b0bae712c6bbc1de6bc50be13010a8 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 7 Mar 2026 16:45:50 -0500 Subject: start + esc to close a screen, clear screen when closing. --- src/irc.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/irc.c') diff --git a/src/irc.c b/src/irc.c index 0c1e4cd..6a66f24 100644 --- a/src/irc.c +++ b/src/irc.c @@ -400,15 +400,29 @@ static void parse_msg(void) { p = strtok(0, " "); if(p) { msg_args[msg_argcount] = p; + /* if any arg is a channel name, use it for the dest */ + if(*p == '#') + msg_dest = p; } else { break; } } } - if(msg_argcount) - msg_dest = msg_args[0]; - else if(msg_text) - msg_dest = msg_text; + + /* + if(msg_dest) { + scr_print_current("got here, msg_dest is: "); + scr_print_current(msg_dest); + scr_print_current("\n"); + } + */ + + if(!msg_dest) { + if(msg_argcount) + msg_dest = msg_args[0]; + else if(msg_text) + msg_dest = msg_text; + } if(msg_src) { if((p = strstr(msg_src, "!"))) { @@ -526,6 +540,8 @@ static void start_keystroke(void) { scr_display(s); } else if(i == CH_CURS_UP || i == '-') { scrollback(); + } else if(i == 0x1b) { /* escape */ + scr_destroy(scr_current); } } -- cgit v1.2.3