diff -ruN -Xcvs/diff_ignore cvs/server/stdinhand.c work/server/stdinhand.c --- cvs/server/stdinhand.c Sat Jul 15 17:34:26 2000 +++ work/server/stdinhand.c Tue Jul 18 21:40:00 2000 @@ -59,6 +59,8 @@ enum cmdlevel_id default_access_level = ALLOW_INFO; enum cmdlevel_id first_access_level = ALLOW_INFO; +extern int force_end_of_sniff; + static void cut_player_connection(struct player *caller, char *playername); static void quit_game(struct player *caller); static void show_help(struct player *caller, char *arg); @@ -747,6 +749,7 @@ enum command_id { /* old one-letter commands: */ CMD_START_GAME = 0, + CMD_END_GAME, CMD_HELP, CMD_LIST, CMD_QUIT, @@ -804,6 +807,12 @@ "is no longer available, since it would have no effect.") }, + {"end", ALLOW_CTRL, + "end", + N_("Ends the game."), + N_("This command ends the game.") + }, + {"help", ALLOW_INFO, /* translate <> only */ N_("help\n" @@ -2531,6 +2540,16 @@ _("Cannot start the game: it is already running.")); } break; + case CMD_END_GAME: + if(server_state==RUN_GAME_STATE) { + server_state = GAME_OVER_STATE; + force_end_of_sniff = 1; + } + else { + cmd_reply(cmd,caller, C_FAIL, + _("Cannot end the game: no game running.")); + } + break; case CMD_NUM: case CMD_UNRECOGNIZED: case CMD_AMBIGUOUS: @@ -2606,6 +2625,7 @@ " show - to see current options\n" " set - to set options\n" " start - to start the game once players have connected\n" + " end - to end a running game\n" " save - to save the current game\n" " quit - to exit");