This commit is contained in:
Your Name 2023-12-13 16:48:41 +03:00
parent dbb24457e3
commit ba2c8c49ca
3 changed files with 10 additions and 21 deletions

15
LICENSE
View File

@ -1,11 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004 Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO. 0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@ -1,2 +0,0 @@
# deltarune-irc

14
main.c
View File

@ -81,9 +81,6 @@ void recvinfo(int fd) {
} }
} }
} }
else if (irc_status == IRCC_CONNECTED)
return;
} }
} }
@ -125,21 +122,12 @@ int main(void) {
//Register //Register
IRCC_register(&client, NICK); IRCC_register(&client, NICK);
//Recv motd and join in channel
recvinfo(fd);
sleep(5); sleep(5);
for (size_t i = 0; i < sizeof(channels) / sizeof(char *); i++) { for (size_t i = 0; i < sizeof(channels) / sizeof(char *); i++) {
if (channels[i] == NULL) if (channels[i] == NULL)
break; break;
size_t join_size = strlen("JOIN \r\n") + strlen(channels[i]) + 1; IRCC_join(&client, channels[i], NULL);
char *tmp = malloc(join_size);
if (tmp == NULL)
die("malloc retured NULL");
snprintf(tmp, join_size, "JOIN %s\r\n", channels[i]);
send(client.socket, tmp, join_size, 0);
free(tmp);
} }
recvinfo(fd); recvinfo(fd);