aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-07 01:46:51 -0500
committerB. Watson <urchlay@slackware.uk>2026-03-07 01:46:51 -0500
commitca1bc90d962c44a09fc1c61a26cce1c15b786c37 (patch)
tree8e3b59ca8cf82cafc3cb4e76254cd206b03663b5
parent396e9e6ca3732ec94e6aaa50804d250c795da264 (diff)
downloadfujinet-chat-ca1bc90d962c44a09fc1c61a26cce1c15b786c37.tar.gz
/me and /msg formatting, make edit box 240 bytes
-rw-r--r--src/cmd.c15
-rw-r--r--src/edbox.h2
2 files changed, 13 insertions, 4 deletions
diff --git a/src/cmd.c b/src/cmd.c
index cdd7dd7..ea3f9fa 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -197,6 +197,12 @@ static void do_me(void) {
txbuf_set_str3("PRIVMSG ", target, " :" "\x01" "ACTION ");
txbuf_append_str2(arg1, "\x01");
txbuf_send();
+
+ scr_print_current("\x02* ");
+ scr_print_current(usernick);
+ scr_print_current("\x02 ");
+ scr_print_current(arg1);
+ scr_print_current("\n");
}
static void do_ping(void) {
@@ -251,9 +257,12 @@ static void do_msg(void) {
char s;
arg2 = nextarg(arg1);
if(arg2) {
- // TODO: print message to screen!
- // s = scr_getbyname(arg1);
- // if(!s) s = SCR_PRIV;
+ scr_print_current("->*");
+ scr_print_current(arg1);
+ scr_print_current("* ");
+ scr_print_current(arg2);
+ scr_print_current("\n");
+
txbuf_set_str3("PRIVMSG ", arg1, " :");
txbuf_append_str(arg2);
txbuf_send();
diff --git a/src/edbox.h b/src/edbox.h
index a410cec..3344353 100644
--- a/src/edbox.h
+++ b/src/edbox.h
@@ -2,7 +2,7 @@
/**** public API ****/
-#define EDBOX_SIZE 160
+#define EDBOX_SIZE 240
/* clear the contents of the edit box (whether it's visible or not) */
void edbox_clear(void);