Index: client/options.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/options.c,v retrieving revision 1.40 diff -u -r1.40 options.c --- client/options.c 2001/07/04 11:24:19 1.40 +++ client/options.c 2001/08/30 23:43:56 @@ -161,6 +161,7 @@ N_("Wonder Will Be Finished Next Turn"), /* E_CITY_WONDER_WILL_BE_BUILT */ N_("Learned New Government"), /* E_NEW_GOVERNMENT */ N_("City Nuked"), /* E_CITY_NUKED */ + N_("Messages from the Server Operator"), /* E_MESSAGE_WALL*/ }; /************************************************************************** Index: common/events.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/events.h,v retrieving revision 1.17 diff -u -r1.17 events.h --- common/events.h 2001/07/04 11:24:21 1.17 +++ common/events.h 2001/08/30 23:43:56 @@ -60,6 +60,7 @@ E_CITY_WONDER_WILL_BE_BUILT, E_NEW_GOVERNMENT, E_CITY_NUKED, + E_MESSAGE_WALL, /* Note: If you add a new event, make sure you make a similar change to message_text in client/options.c */ 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 23:43:57 @@ -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,17 @@ 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); + notify_conn_ex(&game.game_connections,-1,-1,E_MESSAGE_WALL, + _("Server Operator: %s"),wallbuffer); +} /****************************************************************** Send a report with server options to specified connections. @@ -2805,6 +2823,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);