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/09/04 18:05:21 @@ -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*/ }; /************************************************************************** @@ -184,6 +185,7 @@ { int out_only[] = {E_IMP_BUY, E_IMP_SOLD, E_UNIT_BUY, E_MY_DIPLOMAT, E_UNIT_LOST_ATT, E_UNIT_WIN_ATT}; + int all[] = {E_MESSAGE_WALL}; int i; for(i=0; i"), + 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.") @@ -2324,6 +2331,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. @@ -2826,6 +2844,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);