Index: server/civserver.c =================================================================== --- server/civserver.c (revision 12345) +++ server/civserver.c (working copy) @@ -90,6 +90,8 @@ srvarg.log_filename = option; else if ((option = get_option("--gamelog", argv, &inx, argc))) srvarg.gamelog_filename = option; + else if ((option = get_option("--players", argv, &inx, argc))) + srvarg.players_filename = option; else if (is_option("--nometa", argv[inx])) { fc_fprintf(stderr, _("Warning: the %s option is obsolete. " "Use -m to enable the metaserver.\n"), argv[inx]); Index: server/srv_main.h =================================================================== --- server/srv_main.h (revision 12345) +++ server/srv_main.h (working copy) @@ -35,6 +35,7 @@ /* filenames */ char *log_filename; char *gamelog_filename; + char *players_filename; char load_filename[512]; /* FIXME: may not be long enough? use MAX_PATH? */ char *script_filename; char *saves_pathname; Index: server/plrhand.c =================================================================== --- server/plrhand.c (revision 12345) +++ server/plrhand.c (working copy) @@ -17,6 +17,7 @@ #include #include +#include #include "diptreaty.h" #include "events.h" @@ -2331,5 +2332,23 @@ check_for_full_turn_done(); + { + FILE *f = fopen(srvarg.players_filename, "w"); + if (f) + { + const char *yes = "Yes", *no = "No"; + fprintf(f, " Player\tAlive\tAI\tTurn Done\n"); + players_iterate(p) { + fprintf(f, "%s\t%s\t%s\t%s\n%s", + p->name, + p->is_alive ? yes : no, + p->ai.control ? yes : no, + p->turn_done ? yes : no, + "" + ); + } players_iterate_end; + } + } + send_player_info(pplayer, NULL); }