Index: server/sernet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/sernet.c,v retrieving revision 1.57 diff -u -r1.57 sernet.c --- sernet.c 2000/08/28 17:56:54 1.57 +++ sernet.c 2000/09/05 15:34:42 @@ -117,12 +117,18 @@ *****************************************************************************/ static void handle_readline_input_callback(char *line) { - if (line) { - if (*line) - add_history(line); - con_prompt_enter(); /* just got an 'Enter' hit */ - handle_stdin_input((struct connection*)NULL, line); + if (!line) { /* This happens if you type an EOF character with + nothing on the current line. */ + printf("quit"); + quit_game(NULL); /* Maybe print an 'are you sure?' message? */ } + + if (*line) + add_history(line); + + con_prompt_enter(); /* just got an 'Enter' hit */ + handle_stdin_input((struct connection*)NULL, line); + readline_handled_input = 1; } Index: server/stdinhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v retrieving revision 1.160 diff -u -r1.160 stdinhand.c --- stdinhand.c 2000/09/01 13:34:38 1.160 +++ stdinhand.c 2000/09/05 15:34:53 @@ -64,7 +64,6 @@ static enum cmdlevel_id first_access_level = ALLOW_INFO; static void cut_client_connection(struct connection *caller, char *playername); -static void quit_game(struct connection *caller); static void show_help(struct connection *caller, char *arg); static void show_list(struct connection *caller, char *arg); static void show_connections(struct connection *caller); @@ -2768,7 +2767,7 @@ /************************************************************************** ... **************************************************************************/ -static void quit_game(struct connection *caller) +void quit_game(struct connection *caller) { struct packet_generic_message gen_packet; gen_packet.message[0]='\0'; Index: server/stdinhand.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.h,v retrieving revision 1.18 diff -u -r1.18 stdinhand.h --- stdinhand.h 2000/08/28 17:56:55 1.18 +++ stdinhand.h 2000/09/05 15:34:53 @@ -27,6 +27,8 @@ void read_init_script(char *script_filename); void show_players(struct connection *caller); +void quit_game(struct connection *caller); + void toggle_ai_player_direct(struct connection *caller, struct player *subject); /* for sernet.c in initing a new connection */