This commit is contained in:
Your Name 2025-06-12 22:42:01 +03:00
parent ee7b7cd779
commit ea0f4d0651
2 changed files with 7 additions and 1 deletions

View file

@ -51,6 +51,7 @@ int IRCC_connect(IRCC_client *irc, const char *ip, const int port) {
if (status == -1)
return IRCC_ERROR;
irc->irc_alloc = 1;
return IRCC_SUCCESS;
}
@ -218,6 +219,9 @@ int IRCC_initssl(IRCC_client *irc) {
}
void IRCC_close(IRCC_client *irc) {
if (!irc->irc_alloc)
return;
close(irc->irc_socket);
irc->irc_msg = irc->irc_nick = irc->irc_channel = NULL;