Skip to content

Commit a0f1cba

Browse files
authored
add nick change highlighting
1 parent 8737794 commit a0f1cba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kirc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ raw_parser(char *string) {
176176
} else if (!strncmp(command, "JOIN", 4)) {
177177
printf("%*s--> \x1b[32;1m%s\x1b[0m\n", g - 3, "", nickname);
178178
return;
179+
} else if (!strncmp(command, "NICK", 4)) {
180+
printf("\x1b[33;1m%*s\x1b[0m --> \x1b[33m%s\x1b[0m\n", g - 4, nickname, message);
181+
return;
179182
} else if (!strncmp(command, "PRIVMSG", 7) && strcmp(channel, nick) == 0) {
180183
printf("%*s\x1b[43;1m%-.*s\x1b[0m ", s, "", g, nickname);
181184
} else if (!strncmp(command, "PRIVMSG", 7) && strstr(channel, chan_default) == NULL) {

0 commit comments

Comments
 (0)