From 06af6a801c58584e6466e5540a1961a7cf43419e Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 21 Feb 2024 11:24:56 +0100 Subject: [PATCH] sending WHY2_CHAT_CODE_ACCEPT_MESSAGES earlier --- src/chat/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat/misc.c b/src/chat/misc.c index 35ca4aa..09b8fdd 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -367,6 +367,8 @@ void *why2_communicate_thread(void *arg) printf("User connected.\t\t%d\n", connection); + send_socket_deallocate(WHY2_CHAT_CODE_ACCEPT_MESSAGES, why2_chat_server_config("server_username"), connection); //TELL USER HE CAN START COMMUNICATING + //GET USERNAME char *config_username = why2_chat_server_config("user_pick_username"); @@ -472,8 +474,6 @@ void *why2_communicate_thread(void *arg) send_to_all(raw); //FUCKING SEND TO ALL YOU TWAT - why2_send_socket(WHY2_CHAT_CODE_ACCEPT_MESSAGES, WHY2_CHAT_SERVER_USERNAME, connection); //TELL USER HE CAN START COMMUNICATING - why2_deallocate(raw); why2_deallocate(connection_message); why2_deallocate(username);