diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-14 04:19:26 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-14 04:19:26 -0400 |
| commit | 7f4b86763ca2f340ff9e1cae9a139f91fe349149 (patch) | |
| tree | 943be86bd5bdfe709da847f306cb934012a84498 /src/irc.c | |
| parent | 94b8c969ac821a440834d57514ccd403cc134dd1 (diff) | |
| download | fujinet-chat-7f4b86763ca2f340ff9e1cae9a139f91fe349149.tar.gz | |
show hilited screens in red.
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -72,7 +72,10 @@ static void hilite_bold(void) { } static void do_chan_nick(void) { - if(hilite) bell(); + if(hilite) { + bell(); + scr_hilite_active(); + } hilite_bold(); scr_print_active("<"); hilite_bold(); @@ -93,6 +96,7 @@ static void do_priv_nick(void) { scr_print_active("*"); scr_print_active(msg_src); scr_print_active("* "); + scr_hilite_active(); bell(); } } @@ -224,10 +228,11 @@ static void do_privmsg(void) { return; } - if(*msg_dest == '#') + if(*msg_dest == '#') { do_chan_nick(); - else + } else { do_priv_nick(); + } scr_print_active(msg_text); scr_eol_active(); @@ -761,16 +766,28 @@ static char cur_is_query(void) { } */ -void switch_to_active() { +char find_scr(int status) { char i; for(i = 0; i < MAX_SCREENS; i++) { - if(scr_status[i] == SCR_ACTIVE) { - scr_prev = scr_current; - scr_display(i); - return; + if(scr_status[i] == status) { + return i; } } + return 0xff; +} + +void switch_to_active() { + char i; + + i = find_scr(SCR_HILITE); + if(i == 0xff) + i = find_scr(SCR_ACTIVE); + if(i != 0xff) { + scr_prev = scr_current; + scr_display(i); + } + } void list_screens(void) { |
