aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-16 03:06:19 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-16 03:06:19 -0400
commit545db9259365913f433f21f9c33f278fe96194d2 (patch)
tree8d8a3183bace932731357a3755023279861ebe75 /src/irc.c
parent6d6c44d74e113ace4709f037316a2ec80753aa3a (diff)
downloadfujinet-chat-545db9259365913f433f21f9c33f278fe96194d2.tar.gz
Move screen statuses to the right, get rid of <>, add indicators for net activity and most-recent incoming IRC activity.
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/irc.c b/src/irc.c
index cd11ba8..4de51ff 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -13,6 +13,7 @@
#include <conio.h>
#include "nio.h"
#include "config.h"
+#include "indic8.h"
#ifndef VERSION
#define VERSION "?????"
@@ -234,8 +235,10 @@ static void do_privmsg(void) {
if(*msg_dest == '#') {
do_chan_nick();
+ ind_act_chantext();
} else {
do_priv_nick();
+ ind_act_pm();
}
scr_print_active(msg_text);
@@ -252,6 +255,7 @@ static void do_notice(void) {
}
static void do_join(void) {
+ ind_act_join();
if(streq_i(conf->nick, msg_src)) {
scr_print_active("You have ");
} else {
@@ -264,6 +268,7 @@ static void do_join(void) {
}
static void do_nick(void) {
+ // ind_act_none();
if(streq_i(conf->nick, msg_src)) {
scr_print_active("You are ");
strncpy(conf->nick, msg_dest, 32);
@@ -277,12 +282,14 @@ static void do_nick(void) {
}
static void do_quit(void) {
+ ind_act_quit();
scr_print_active(msg_src);
scr_print_active(" has quit IRC");
print_reason();
}
static void do_part(void) {
+ ind_act_part();
scr_print_active(msg_src);
scr_print_active(" has left ");
scr_print_active(msg_dest);
@@ -665,6 +672,7 @@ int irc_read(void) {
if(err != 1) {
scr_display(SCR_SERVER);
regged = 0;
+ ind_net_down();
if(err == 136) {
scr_print_current("Disconnected");
} else {
@@ -681,9 +689,11 @@ int irc_read(void) {
if(rxbuflen > MAX_MSG)
rxbuflen = MAX_MSG;
+ ind_net_rx();
if(rxbuflen > 0) {
err = nread(conf->url, rx_buf, rxbuflen);
if(err != 1) {
+ ind_net_down();
print_errnum();
return 0;
}
@@ -694,6 +704,7 @@ int irc_read(void) {
irc_split_Lines();
}
+ ind_net_idle();
return 1;
}