From 396e9e6ca3732ec94e6aaa50804d250c795da264 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 6 Mar 2026 23:25:10 -0500 Subject: Fix /me and /nick --- Makefile | 7 +++++++ src/cmd.c | 8 +++++--- src/irc.c | 13 +++++++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 01e1b8f..cf1378c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ PARTS=memsetup.xex font_dl.xex client.xex +TESTXEX=fnchat-$(shell date +%Y%m%d-%H%M).xex + # remove the -a if using older versions of atasm ATASM=atasm -s -a @@ -28,3 +30,8 @@ font_dl.xex: font_dl.asm font.dat test: memsetup.xex font_dl.xex cl65 -C src/atari.cfg -t atari -o testmain.xex src/addrs.c src/edbox.c src/screen.c src/keyclick.s uitest/test.c cat memsetup.xex font_dl.xex testmain.xex > test.xex + +install: all + cp fnchat.xex $(TESTXEX) + sluk $(TESTXEX) + scp $(TESTXEX) zapp:/var/tnfs/ diff --git a/src/cmd.c b/src/cmd.c index 9d38c31..cdd7dd7 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -194,7 +194,7 @@ static void do_me(void) { return; } - txbuf_set_str3("PRIVMSG ", target, " :" " \x01" "ACTION "); + txbuf_set_str3("PRIVMSG ", target, " :" "\x01" "ACTION "); txbuf_append_str2(arg1, "\x01"); txbuf_send(); } @@ -265,9 +265,11 @@ static void do_msg(void) { static int cmd_local(void) { arg1 = nextarg(command); + /* scr_print_current("command: "); scr_print_current(command); scr_print_current("\n"); + */ for(cmd_def = &command_defs[0]; cmd_def->cmd; cmd_def++) { if(streq_i(command, cmd_def->cmd)) { @@ -276,12 +278,12 @@ static int cmd_local(void) { } else { (*(cmd_def->func))(); } - scr_print_current("(did local command)\n"); + // scr_print_current("(did local command)\n"); return 1; } } - scr_print_current("(not a local command)\n"); + // scr_print_current("(not a local command)\n"); return 0; } diff --git a/src/irc.c b/src/irc.c index e48ef6d..0c1e4cd 100644 --- a/src/irc.c +++ b/src/irc.c @@ -115,7 +115,7 @@ static void do_nick(void) { scr_print_active(msg_src); scr_print_active(" is "); } - scr_print_active(" now known as "); + scr_print_active("now known as "); scr_print_active(msg_dest); scr_eol_active(); } @@ -355,6 +355,12 @@ static void parse_msg(void) { /* ignore empty message */ if(!*msg) return; + /* + scr_print_active("RAW: "); + scr_print_active(msg); + scr_print_active("\n"); + */ + /* if there's a final multiword arg... */ /* FIXME: channel names can have colons, which breaks this... */ p = strstr(msg + 1, " :"); /* +1 to skip leading colon in msg source */ @@ -399,7 +405,10 @@ static void parse_msg(void) { } } } - if(msg_argcount) msg_dest = msg_args[0]; + if(msg_argcount) + msg_dest = msg_args[0]; + else if(msg_text) + msg_dest = msg_text; if(msg_src) { if((p = strstr(msg_src, "!"))) { -- cgit v1.2.3