aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-07 16:45:50 -0500
committerB. Watson <urchlay@slackware.uk>2026-03-07 16:45:50 -0500
commitff02ca89a0b0bae712c6bbc1de6bc50be13010a8 (patch)
treeca1fd9fc13be59daa5435879b819586ae0011493 /src/irc.c
parentca1bc90d962c44a09fc1c61a26cce1c15b786c37 (diff)
downloadfujinet-chat-ff02ca89a0b0bae712c6bbc1de6bc50be13010a8.tar.gz
start + esc to close a screen, clear screen when closing.
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c24
1 files changed, 20 insertions, 4 deletions
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);
}
}