Binary files freeciv/bar.gz and spyoncmds/bar.gz differ Binary files freeciv/foo.gz and spyoncmds/foo.gz differ diff -Nurd -Xfreeciv/diff_ignore freeciv/server/stdinhand.c spyoncmds/server/stdinhand.c --- freeciv/server/stdinhand.c Sun Aug 19 01:06:08 2001 +++ spyoncmds/server/stdinhand.c Mon Aug 20 00:26:58 2001 @@ -1093,7 +1093,7 @@ ) }, - {"endgame", ALLOW_CTRL, + {"endgame", ALLOW_HACK, "endgame", N_("End the game."), N_("This command ends the game immediately.") @@ -1102,8 +1102,12 @@ /* TRANS: translate text between <> only */ N_("remove "), N_("Fully remove player from game."), + /* N_("This *completely* removes a player from the game, including " "all cities and units etc. Use with care!") + */ + /* note: cannot be used once game has started due to problems with + player renumbering - make it ALLOW_HACK once this is repaired - rp */ }, {"save", ALLOW_HACK, /* TRANS: translate text between <> only */ @@ -1409,8 +1413,10 @@ if (send_server_info_to_metaserver(1,0)) { notify_player(0, _("Open metaserver connection to [%s]."), meta_addr_port()); + /* cmd_reply(CMD_METACONN, caller, C_OK, _("Metaserver connection opened.")); + */ } } @@ -1423,8 +1429,10 @@ server_close_udp(); notify_player(0, _("Close metaserver connection to [%s]."), meta_addr_port()); + /* cmd_reply(CMD_METACONN, caller, C_OK, _("Metaserver connection closed.")); + */ } } @@ -1476,8 +1484,10 @@ } else { notify_player(0, _("Metaserver infostring set to '%s'."), srvarg.metaserver_info_line); + /* cmd_reply(CMD_METAINFO, caller, C_OK, _("Metaserver info string set.")); + */ } } @@ -1493,8 +1503,10 @@ notify_player(0, _("Metaserver is now [%s]."), meta_addr_port()); + /* cmd_reply(CMD_METASERVER, caller, C_OK, _("Metaserver address set.")); + */ } /*************************************************************** @@ -1587,8 +1599,10 @@ pplayer->ai.control = !pplayer->ai.control; if (pplayer->ai.control) { notify_player(0, _("Game: %s is now AI-controlled."), pplayer->name); + /* cmd_reply(CMD_AITOGGLE, caller, C_OK, _("%s is now under AI control."), pplayer->name); + */ if (pplayer->ai.skill_level==0) { pplayer->ai.skill_level = game.skill_level; } @@ -1606,8 +1620,10 @@ assess_danger_player(pplayer); } else { notify_player(0, _("Game: %s is now human."), pplayer->name); + /* cmd_reply(CMD_AITOGGLE, caller, C_OK, _("%s is now under human control."), pplayer->name); + */ /* because the hard AI `cheats' with government rates but humans shouldn't */ if (!game.is_new_game) { @@ -1687,8 +1703,10 @@ pplayer->ai.control = 1; set_ai_level_directer(pplayer, game.skill_level); + /* cmd_reply(CMD_CREATE, caller, C_OK, _("Created new AI player: %s."), pplayer->name); + */ } @@ -1718,8 +1736,10 @@ sz_strlcpy(name, pplayer->name); server_remove_player(pplayer); if (caller==NULL || caller->used) { /* may have removed self */ + /* cmd_reply(CMD_REMOVE, caller, C_OK, _("Removed player %s from the game."), name); + */ } } @@ -2377,8 +2397,12 @@ if (pplayer) { if (pplayer->ai.control) { set_ai_level_directer(pplayer, level); + /* cmd_reply(cmd, caller, C_OK, _("%s is now %s."), pplayer->name, name_of_skill_level(level)); + */ + notify_player(0, _("Game: Player '%s' now has skill level '%s'."), + pplayer->name, name_of_skill_level(level)); } else { cmd_reply(cmd, caller, C_FAIL, _("%s is not controlled by the AI."), pplayer->name); @@ -2388,12 +2412,18 @@ pplayer = get_player(i); if (pplayer->ai.control) { set_ai_level_directer(pplayer, level); + /* cmd_reply(cmd, caller, C_OK, _("%s is now %s."), pplayer->name, name_of_skill_level(level)); + */ } } + /* cmd_reply(cmd, caller, C_OK, _("Setting game.skill_level to %d."), level); + */ + notify_player(0, _("Game: AI players now have skill level '%s'."), + pplayer->name, name_of_skill_level(level)); game.skill_level = level; } else { cmd_reply_no_such_player(cmd, caller, name, match_result); @@ -2586,11 +2616,13 @@ char *reject_message = NULL; if (!settings[cmd].func_change || settings[cmd].func_change(val, &reject_message)) { *(op->value) = val; + /* cmd_reply(CMD_SET, caller, C_OK, _("Option: %s has been set to %d."), settings[cmd].name, val); - if (sset_is_to_client(cmd)) { - notify_player(0, _("Option: %s has been set to %d."), + */ + notify_player(0, _("Option: %s has been set to %d."), settings[cmd].name, val); + if (sset_is_to_client(cmd)) { /* canonify map generator settings( all of which are int ) */ adjust_terrain_param(); /* send any modified game parameters to the clients -- @@ -2615,9 +2647,11 @@ if (!settings[cmd].func_change_s || settings[cmd].func_change_s(arg, &reject_message)) { strcpy(op->svalue, arg); + /* cmd_reply(CMD_SET, caller, C_OK, _("Option: %s has been set to \"%s\"."), op->name, op->svalue); + */ if (sset_is_to_client(cmd)) { notify_player(0, _("Option: %s has been set to \"%s\"."), op->name, op->svalue); @@ -2692,6 +2726,10 @@ cmd_reply(cmd, caller, C_FAIL, _("You are not allowed to use this command.")); return; + } + if (commands[cmd].level > ALLOW_INFO) { + /* this command will affect the game - inform all players */ + notify_player(0, "%s: '%s'", caller ? caller->name : "(server prompt)", str); } for(; *cptr_s && isspace(*cptr_s); cptr_s++);