aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-02 13:57:09 -0500
committerB. Watson <urchlay@slackware.uk>2026-03-02 13:57:09 -0500
commitba295fcffbd353e45297bbeec96f681bb4f2e00e (patch)
treef389f30118fd48fb0c0b2eec9033b6ecc3ac4a7c /src/irc.c
parentd9944f89414147a333652d4007864d13ac84c4d1 (diff)
downloadfujinet-chat-ba295fcffbd353e45297bbeec96f681bb4f2e00e.tar.gz
channel text goes to correct screen.
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/irc.c b/src/irc.c
index 3a25096..9f1a280 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -22,12 +22,14 @@ static char msgbuf[MAX_MSG] = { 0 };
static char *msg; /* with source removed */
static int msgbuf_len = 0, msg_len = 0;
-static char regged = 0;
+static char regged = 0, hilite = 0;
+/*
static void join_channel(void) {
txbuf_set_str2("JOIN ", channel);
txbuf_send();
}
+*/
static void print_reason(void) {
if(msg_text) {
@@ -43,15 +45,23 @@ static void do_pong(void) {
txbuf_send();
}
+static void hilite_bold(void) {
+ if(hilite) scr_print_active("\x02");
+}
+
static void do_chan_nick(void) {
+ hilite_bold();
scr_print_active("<");
+ hilite_bold();
scr_print_active(msg_src);
if(scr_active == SCR_SERVER) {
/* if we don't have a window for it */
scr_print_active("/");
scr_print_active(msg_dest);
}
+ hilite_bold();
scr_print_active("> ");
+ hilite_bold();
}
static void do_priv_nick(void) {
@@ -61,6 +71,12 @@ static void do_priv_nick(void) {
}
static void do_privmsg(void) {
+ /* TODO: this shouldn't be case-sensitive */
+ if(strstr(msg_text, usernick))
+ hilite = 1;
+ else
+ hilite = 0;
+
if(*msg_dest == '#')
do_chan_nick();
else