? diff Index: client/civclient.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v retrieving revision 1.98 diff -u -r1.98 civclient.c --- client/civclient.c 2001/09/02 10:53:26 1.98 +++ client/civclient.c 2001/09/07 10:39:40 @@ -74,7 +74,7 @@ /* * Non-zero = skip "Connect to Freeciv Server" dialog */ -int auto_connect = 0; +int auto_connect = 0; enum client_states client_state=CLIENT_BOOT_STATE; @@ -489,6 +489,9 @@ **************************************************************************/ void set_client_state(enum client_states newstate) { + int connect_error = (client_state == CLIENT_PRE_GAME_STATE) + && (newstate == CLIENT_PRE_GAME_STATE); + if(client_state!=newstate) { /* If changing from pre-game state to _either_ select race @@ -524,7 +527,13 @@ } if (client_state == CLIENT_PRE_GAME_STATE) { if (auto_connect) { - server_autoconnect(); + if (connect_error) { + freelog(LOG_NORMAL, + _("There was an error while auto connecting; aborting.")); + exit(1); + } else { + server_autoconnect(); + } } else { gui_server_connect(); } Index: client/civclient.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/civclient.h,v retrieving revision 1.12 diff -u -r1.12 civclient.h --- client/civclient.h 2001/09/02 10:24:25 1.12 +++ client/civclient.h 2001/09/07 10:39:40 @@ -41,5 +41,6 @@ extern char server_host[512]; extern char player_name[512]; extern int server_port; +extern int auto_connect; #endif /* FC__CIVCLIENT_H */ Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.183 diff -u -r1.183 packhand.c --- client/packhand.c 2001/09/06 19:48:13 1.183 +++ client/packhand.c 2001/09/07 10:39:42 @@ -157,6 +157,9 @@ _("You were rejected from the game: %s"), packet->message); append_output_window(msg); game.conn_id = 0; + if (auto_connect) { + freelog(LOG_NORMAL, "%s", msg); + } } if (strcmp(s_capability, our_capability)==0) return; Index: client/gui-gtk/connectdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/connectdlg.c,v retrieving revision 1.27 diff -u -r1.27 connectdlg.c --- client/gui-gtk/connectdlg.c 2001/08/28 18:41:55 1.27 +++ client/gui-gtk/connectdlg.c 2001/09/07 10:39:42 @@ -300,6 +300,7 @@ { char errbuf[512]; static int count = 0; + static int warning_shown = 0; count++; @@ -316,6 +317,13 @@ return FALSE; /* Tells GTK not to call this function again */ case ECONNREFUSED: /* Server not available (yet) */ + if (!warning_shown) { + freelog(LOG_NORMAL, _("Connection to server refused. " + "Please start the server.")); + append_output_window(_("Connection to server refused. " + "Please start the server.")); + warning_shown = 1; + } return TRUE; /* Tells GTK to keep calling this function */ default: /* All other errors are fatal */ freelog(LOG_FATAL,