Specify list start

This commit is contained in:
Alex D. 2021-01-07 11:52:00 +00:00
parent 619c2e4125
commit 2b4197afea
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 4 additions and 1 deletions

View File

@ -13,12 +13,15 @@ int main(void)
IRC_Message out;
for (; bread > 0;) {
if ((tok = get_buffer_line(buffer, &out)) > 0) {
if (out.cmd == RPL_LISTSTART || out.cmd == RPL_LIST) {
if (out.cmd == RPL_LIST) {
printf(ANSI_COLOR_YELLOW "%s" ANSI_COLOR_RESET "\nTopic: %s\nUsers: %s\n", out.args[1], out.args[3], out.args[2]);
print_local_time(out.tags.time.value);
putchar('\n');
} else if (out.cmd == RPL_LISTEND) {
printf(ANSI_COLOR_RED "----- END" ANSI_COLOR_RESET "\n");
} else if (out.cmd == RPL_LISTSTART) {
// NOTE: DEPRECATED BUT STILL USED
printf(ANSI_COLOR_GREEN "----- START" ANSI_COLOR_RESET "\n");
}
for (long unsigned int x = 0; x < sizeof(buffer) && *(buffer + tok + x); x++) *(buffer + x) = *(buffer + x + tok);
pos -= (unsigned long)tok;