aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/irc.c b/src/irc.c
index d9f19aa..4f791d7 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -30,6 +30,7 @@ char irc_away = 0;
char bell_type;
char hide_motd;
char start_latch = 0;
+char new_scr_status;
static char msgbuf[MAX_MSG] = { 0 };
static char *msg; /* with source removed */
@@ -83,7 +84,8 @@ static void hilite_bold(void) {
static void do_chan_nick(void) {
if(hilite) {
bell();
- scr_hilite_active();
+ // scr_hilite_active();
+ new_scr_status = SCR_HILITE;
}
hilite_bold();
scr_print_active("<");
@@ -105,7 +107,8 @@ static void do_priv_nick(void) {
scr_print_active("*");
scr_print_active(msg_src);
scr_print_active("* ");
- scr_hilite_active();
+ // scr_hilite_active();
+ new_scr_status = SCR_HILITE;
bell();
}
}
@@ -534,9 +537,12 @@ void select_screen(void) {
static void dispatch_msg(void) {
/* at this point, we know the message source and destination, so: */
+ /* FIXME: maybe we know... */
select_screen();
+ new_scr_status = SCR_OTHER;
if(streq_i(msg_cmd, "PRIVMSG")) {
+ new_scr_status = SCR_ACTIVE;
do_privmsg();
} else if(streq_i(msg_cmd, "NOTICE")) {
do_notice();
@@ -561,6 +567,11 @@ static void dispatch_msg(void) {
} else {
do_catchall(0);
}
+
+ if(scr_active != scr_current) {
+ scr_status[scr_active] = new_scr_status;
+ scr_show_status(scr_current);
+ }
}
/* msgbuf contains a complete message from the server, whose
@@ -876,6 +887,8 @@ void switch_to_active() {
i = find_scr_with_status(SCR_HILITE);
if(i == 0xff)
i = find_scr_with_status(SCR_ACTIVE);
+ if(i == 0xff)
+ i = find_scr_with_status(SCR_OTHER);
if(i != 0xff) {
scr_prev = scr_current;
scr_display(i);
@@ -1020,12 +1033,12 @@ static void keystroke(void) {
txbuf_send_str("AWAY");
irc_away = 0;
}
- OS.cdtmv3 = hz / 3;
if(GTIA_READ.consol == 6 || start_latch) { /* start pressed */
start_keystroke();
} else {
edbox_keystroke();
}
+ OS.cdtmv3 = hz / 3;
}
/* only exits on error (e.g. connection closed, which might be via /QUIT). */