From 037521b87113a81d8fbc40594404a338ead49d83 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 2 May 2023 18:55:21 +0200 Subject: [PATCH] sending WHY2_CHAT_CODE_PICK_USERNAME signal to client at connect --- src/chat/misc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/chat/misc.c b/src/chat/misc.c index 69899ac..38f0e0c 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -28,6 +28,7 @@ along with this program. If not, see . #include +#include #include #include #include @@ -298,6 +299,9 @@ void *why2_communicate_thread(void *arg) why2_list_push(&connection_list, &node, sizeof(node)); //ADD TO LIST printf("User connected.\t\t%d\n", connection); + //GET USERNAME //TODO: Use config + why2_send_socket(WHY2_CHAT_CODE_PICK_USERNAME, "server", connection); + void *buffer; char *received = NULL; char *raw = why2_strdup("");