diff options
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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 |
