diff --git a/src/chat/misc.c b/src/chat/misc.c index 97c60e5..dba0bb7 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -390,6 +390,8 @@ void *why2_communicate_thread(void *arg) { if (config_username == NULL) fprintf(stderr, "Your config doesn't contain 'user_pick_username'. Please update your configuration.\n"); + why2_send_socket(WHY2_CHAT_CODE_PICK_USERNAME, WHY2_CHAT_SERVER_USERNAME, connection); //ASK USER FOR USERNAME + while (invalid_username) { if (usernames_n++ == WHY2_MAX_USERNAME_TRIES) //ASKED CLIENT WAY TOO FUCKING MANY TIMES FOR USERNAME, KICK HIM @@ -398,8 +400,6 @@ void *why2_communicate_thread(void *arg) goto deallocation; } - why2_send_socket(WHY2_CHAT_CODE_PICK_USERNAME, WHY2_CHAT_SERVER_USERNAME, connection); //ASK USER FOR USERNAME - if ((raw = read_user(connection, &raw_ptr)) == NULL) //READ { force_exiting = 1; //FAILURE