Skip to content

Commit 2718692

Browse files
authored
Merge pull request #40 from mcpcpc/highlighting
add additional highlighting
2 parents e6a4cd9 + b64d21a commit 2718692

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kirc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,15 @@ raw_parser(char *string) {
170170
} return;
171171
} else if (!strncmp(command, "90", 2)) {
172172
raw("CAP END\r\n");
173-
} else if (!strncmp(command, "QUIT", 4)) {
173+
} else if (!strncmp(command, "QUIT", 4) || !strncmp(command, "PART", 4)) {
174174
printf("%*s<-- \x1b[34;1m%s\x1b[0m\n", g - 3, "", nickname);
175175
return;
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[35;1m%*s\x1b[0m --> \x1b[35;1m%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)