connected client needs to provide a username which will be communicated to rejected clients

This commit is contained in:
Igor Socec 2014-04-03 02:04:13 +02:00
parent 55367f5fee
commit 75b30f3aa6
5 changed files with 63 additions and 17 deletions

View file

@ -210,12 +210,14 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "[%s] problem accepting client\n", NAME);
continue;
}
/* ask client to provide a username before going to "character" mode */
client_ask_username(&client);
/* put client in "character" mode */
telnet_set_character_mode(&client);
}
/* reject connection request if a client is already connected */
else {
server_reject(&server);
server_reject(&server, &client);
}
}
/* check client status if connected */