Index: server/stdinhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v retrieving revision 1.188 diff -u -r1.188 stdinhand.c --- server/stdinhand.c 2001/08/27 06:41:21 1.188 +++ server/stdinhand.c 2001/08/30 17:12:46 @@ -882,6 +882,7 @@ CMD_EXPLAIN, CMD_SHOW, CMD_SCORE, + CMD_WALL, /* mostly non-harmful: */ CMD_SET, @@ -996,6 +997,12 @@ N_("For each connected client, pops up a window showing the current " "player scores.") }, + {"wall", ALLOW_HACK, + N_("wall "), + N_("Send message to all connections."), + N_("For each connected client, pops up a window showing the message " + "entered.") + }, {"set", ALLOW_CTRL, N_("set "), N_("Set server options.") @@ -2303,6 +2310,19 @@ show_help_option_list(caller, CMD_EXPLAIN); } } +/****************************************************************** + Send a message to all players +******************************************************************/ +static void wall(char *str) +{ + char wallbuffer[2048]; + wallbuffer[0]=0; + cat_snprintf(wallbuffer, sizeof(wallbuffer),"%s",str); + page_conn(&game.game_connections, + _("Server Message"), + _("Message from the Server"), + wallbuffer); +} /****************************************************************** Send a report with server options to specified connections. @@ -2805,6 +2825,9 @@ cmd_reply(cmd, caller, C_SYNTAX, _("The game must be running before you can see the score.")); } + break; + case CMD_WALL: + wall(arg); break; case CMD_READ_SCRIPT: read_command(caller,arg);