assert (i < server->num_clients);
- printf ("Client %s has left.\r\n", ttt_client_get_username (client));
+ fprintf (stderr, "Client %s has left.\r\n", ttt_client_get_username (client));
memmove (&server->clients[i], &server->clients[i+1],
(server->num_clients - i - 1) * sizeof (ttt_client_t *));
socket = ttt_socket_create_server (args.host, args.port);
- if (args.detach)
+ if (args.detach) {
printf ("Server started listening on %s:%s\n", args.host, args.port);
- else
+ fprintf (stderr, "Server started listening on %s:%s\n", args.host, args.port);
+ } else {
printf (WELCOME_MESSAGE, args.host, args.port, args.host, args.port);
+ }
fclose (stdout);
fclose (stdin);