diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/irc.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -34,6 +34,7 @@ char hide_motd; char start_latch = 0; char new_scr_status; char need_rejoin; +char self_src; static char msgbuf[MAX_MSG] = { 0 }; static int msgbuf_len = 0; @@ -260,7 +261,7 @@ static void do_notice(void) { static void do_join(void) { ind_act_join(); - if(streq_i(config.nick, msg_src)) { + if(self_src) { scr_print_active("You"); } else { scr_print_active("\x02=\x02"); @@ -284,7 +285,7 @@ static void do_nick(void) { return; // ind_act_none(); - if(streq_i(config.nick, msg_src)) { + if(self_src) { scr_print_active("You are "); strncpy(config.nick, msg_dest, 32); } else { @@ -523,6 +524,8 @@ void select_screen(void) { } static void dispatch_msg(void) { + self_src = streq_i(config.nick, msg_src); + /* at this point, we know the message source and destination, so: */ /* FIXME: maybe we know... */ select_screen(); @@ -597,7 +600,7 @@ static void parse_msg(void) { #endif /* special case for ping, treat as 1 arg, even if it has space and no : */ - if(streq_i(msg_cmd, "PING")) { + if(cmd_is("PING")) { txbuf_set_str2("PONG ", msg_cmd + 6); txbuf_send(); return; |
