diff -Nurd -Xfreeciv/diff_ignore freeciv-1.11.12/server/srv_main.c f-r-swap/server/srv_main.c --- freeciv-1.11.12/server/srv_main.c Mon Aug 6 22:41:21 2001 +++ f-r-swap/server/srv_main.c Fri Aug 10 16:11:54 2001 @@ -1780,11 +1780,6 @@ init_our_capability(); game_init(); - /* load a script file */ - - if (srvarg.script_filename) - read_init_script(srvarg.script_filename); - /* load a saved game */ if(srvarg.load_filename) { @@ -1810,6 +1805,7 @@ /* init network */ init_connections(); server_open_socket(); + if(!(srvarg.metaserver_no_send)) { freelog(LOG_NORMAL, _("Sending info to metaserver [%s]"), meta_addr_port()); @@ -1821,6 +1817,11 @@ /* accept new players, wait for serverop to start..*/ freelog(LOG_NORMAL, _("Now accepting new client connections.")); server_state=PRE_GAME_STATE; + + /* load a script file */ + + if (srvarg.script_filename) + read_init_script(NULL,srvarg.script_filename); while(server_state==PRE_GAME_STATE) sniff_packets(); /* Accepting commands. */ diff -Nurd -Xfreeciv/diff_ignore freeciv-1.11.12/server/stdinhand.c f-r-swap/server/stdinhand.c --- freeciv-1.11.12/server/stdinhand.c Tue Aug 7 15:35:06 2001 +++ f-r-swap/server/stdinhand.c Fri Aug 10 16:04:46 2001 @@ -1700,9 +1700,8 @@ /************************************************************************** ... -(Should this take a 'caller' argument for output? --dwp) **************************************************************************/ -void read_init_script(char *script_filename) +void read_init_script(struct connection *caller, char *script_filename) { FILE *script_file; char buffer[MAX_LEN_CONSOLE_LINE]; @@ -1717,6 +1716,8 @@ fclose(script_file); } else { + cmd_reply(CMD_READ_SCRIPT, caller, C_FAIL, + _("Cannot read command line scriptfile '%s'."), script_filename); freelog(LOG_ERROR, _("Could not read script file '%s'."), script_filename); } @@ -1729,7 +1730,7 @@ static void read_command(struct connection *caller, char *arg) { /* warning: there is no recursion check! */ - read_init_script(arg); + read_init_script(caller,arg); } /************************************************************************** diff -Nurd -Xfreeciv/diff_ignore freeciv-1.11.12/server/stdinhand.h f-r-swap/server/stdinhand.h --- freeciv-1.11.12/server/stdinhand.h Sat Apr 14 12:25:06 2001 +++ f-r-swap/server/stdinhand.h Fri Aug 10 16:00:40 2001 @@ -24,7 +24,7 @@ void report_server_options(struct conn_list *dest, int which); void set_ai_level_direct(struct player *pplayer, int level); void set_ai_level_directer(struct player *pplayer, int level); -void read_init_script(char *script_filename); +void read_init_script(struct connection *caller, char *script_filename); void show_players(struct connection *caller); void quit_game(struct connection *caller);